From 136f8b387384c6da64db6bd1258937e35b28576d Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Thu, 5 Jun 2014 16:29:38 -0500 Subject: [PATCH] laziness, guarded recursion, strictness --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index bfbf811..e6519aa 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,23 @@ If you need JavaScript, you probably want Purescript for generating JS. Purescri - http://www.purescript.org/ - http://try.purescript.org/ +## Laziness, strictness, guarded recursion + +http://www.vex.net/~trebla/haskell/lazy.xhtml + +http://stackoverflow.com/questions/13042353/does-haskell-have-tail-recursive-optimization + +```haskell +let a = 1 : a -- guarded recursion, (:) is lazy and can be pattern matched. +> head a +1 + +let a = 1 * a -- not guarded, (*) is strict +> a +*** Exception: <> + +``` + ## Parallelism/Concurrency - http://chimera.labs.oreilly.com/books/1230000000929 This book by Simon Marlow is probably the best I've ever read on the topics of Parallelism and Concurrency: