Created
April 30, 2014 10:58
-
-
Save klapaucius/3823d3ccda55a1bef365 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prelude> let foo ys | (xs:_) <- reverse ys = case xs of xs' | (x:_) <- reverse xs' -> x | |
Prelude> foo [[1..3],[4..7],[8..10]] | |
10 | |
Prelude> let foo' (reverse -> (reverse -> x:_):_) = x | |
Prelude> foo' [[1..3],[4..7],[8..10]] | |
10 |
s-and-witch
commented
May 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment