by goto11 · 5y ago · 0 comments
(a, b) => a + b;
While this function is not pure: (msg) => console.log(msg)
However by your definition I guess the above function is actually also pure, since it can be passed around and manipulated without executing it?The cool thing about Haskell is that purity can be statically guaranteed by the type system and that unpure function are explicitly marked as such in their type signature.