[Haskell-beginners] fnc explanation

Daniel Trstenjak daniel.trstenjak at gmail.com
Mon Jan 2 17:20:58 UTC 2017

Hi Sasa,

> -- this confuses me, what is the _ here ? go is anonymous function, _ should stand for tuple ? and status xs from the top definition ?
> go _ status@(_, False) = status

The first argument of 'go' is '_', which means it's ignored.

The second argument is 'status@(_, False)'.
It's giving the tuple the name 'status' and pattern matching the tuple at once.

If the pattern match succeeds, then the tuple named 'status' is returned by 'go'


More information about the Beginners mailing list