[Haskell-beginners] Haskell triangular loop (correct use of (++))
Sumit Sahrawat, Maths & Computing, IIT (BHU)
sumit.sahrawat.apm13 at iitbhu.ac.in
Sun Apr 10 17:18:12 UTC 2016
Haskell is a declarative language. The primary means of programming in a
declarative language is to provide definitions for stuff, similar to
mathematics. e.g. inc x = x + 1
If you want to define a value using an explicit sequence of steps, then you
have to use monads. The Haskell wikibook has a good tutorial on using the
state monad to generate random numbers. This allows mutation, preventing
which is one of Haskell's prime features, so I wouldn't recommend wiring
code like this.
Complexity analysis is usually tricky in Haskell. You can refer to the book
'purely functional days structures' to know more.
Regards,
Sumit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160410/d9b29134/attachment.html>
More information about the Beginners
mailing list