Skip to content

Instantly share code, notes, and snippets.

@bvssvni
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvssvni/10744118 to your computer and use it in GitHub Desktop.
Save bvssvni/10744118 to your computer and use it in GitHub Desktop.
compute : Integer -> Integer
compute x = if (x `mod` 2) == 0 then x `div` 2 else 3 * x + 1
traverse : Integer -> List Integer
traverse 1 = [1]
traverse x = traverse (compute x) :: x
ERROR:
collatz.idr:7:35:
When elaborating right hand side of Main.traverse:
When elaborating an application of constructor Prelude.List.:::
Can't unify
Integer
with
List Integer
Specifically:
Can't unify
Integer
with
List Integer
Metavariables: Main.traverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment