Complete Haskell newbie here, my apologies ....
I am trying to create a sequence of values ββfrom another sequence and the resulting last value (so itβs not entirely clear to me how I will use the map).
In clojure, I would use a loop
construct that is basically equivalent to a recursive function. So I thought I could use this problem with a recursive function along the lines
genSequence :: [a] -> [b] -> [a] genSequence result [] = reverse result genSequence a:as b:bs = genSequence ((computeNextA ab):a:as) bs
and I think itβs not so bad (the real function, of course, is more complicated ...), but I read about monads (read the excellent Philip Walder tutorial, then some things on monads in clojure) and cannot help but feel that I should use them here. Until now, my knowledge of monads has been purely theoretical, unfortunately, so I would be very grateful if you could help me.
source share