[Haskell-beginners] if ands
keithshep at gmail.com
Thu Nov 5 21:12:49 EST 2009
Also, an nice way to check how evaluation works in ghci is to do something like:
> if False && error "error here" then "it's true" else "it's false"
This expression will evaluate as "it's false" without any "error here"
error message appearing
On Thu, Nov 5, 2009 at 9:05 PM, Nathan M. Holden
<nathanmholden at gmail.com> wrote:
> If you have an if statement like
> if (a&&b) then fun else fun'
> and a is false, does GHC actually bother to check b?
> Beginners mailing list
> Beginners at haskell.org
More information about the Beginners