Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Haskell: Define variable at GHCi prompt


You can Define a variable at Ghci Prompt by using ‘let’ keyword.

Prelude> let radius=10
Prelude> pi
3.141592653589793
Prelude>
Prelude> let area = pi * radius * radius
Prelude> area
314.1592653589793



Previous                                                 Next                                                 Home


This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

Haskell: Define variable at GHCi prompt

×

Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×