Skip to content

Instantly share code, notes, and snippets.

@kakkun61
Created August 16, 2011 12:25
Show Gist options
  • Save kakkun61/1148954 to your computer and use it in GitHub Desktop.
Save kakkun61/1148954 to your computer and use it in GitHub Desktop.
Real World Haskell, Ex. 3.2.6 (p.72 in Ja)
import Data.List
sortByLength = sortBy ord
where ord l1 l2 = if length l1 < length l2
then LT
else if length l1 > length l2
then GT
else EQ
where l1l = length l1
l2l = length l2
-- 8:8: parse error on input `where'
@kakkun61
Copy link
Author

I'll try to learn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment