j
k
j a
j l
sum <- newIORef 0
i <- newIORef 1 let go = do i' <- readIORef i when (i'<n) $ do modifyIORef sum (+i') modifyIORef i (+1) go result <- readIORef sum
why in the world would you write a summation function like that?
Attachments:
Back to the thread
Back to the list