Skip to content

Instantly share code, notes, and snippets.

@MarcelineVQ
Created April 21, 2019 20:06
Show Gist options
  • Select an option

  • Save MarcelineVQ/a4e777ca4b9330f3f06da2fb98a55fb5 to your computer and use it in GitHub Desktop.

Select an option

Save MarcelineVQ/a4e777ca4b9330f3f06da2fb98a55fb5 to your computer and use it in GitHub Desktop.
syntax "(" [a] ",)" = \x => MkPair a x -- \x -> (a,x)
syntax "(," [a] ")" = \x => MkPair x a -- \x -> (x,a)
foo2 : Maybe Int -> Maybe (Int, Int)
foo2 n = (,3) <$> n
foo3 : Int -> (Int, Int)
foo3 n = ((,3)) n -- needs extra parens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment