Skip to content

Instantly share code, notes, and snippets.

@markroxor
Last active September 3, 2020 15:40
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 markroxor/229d7557c3d5252b50ac5d893f72e97b to your computer and use it in GitHub Desktop.
Save markroxor/229d7557c3d5252b50ac5d893f72e97b to your computer and use it in GitHub Desktop.
temp1
-- doesnt work
is_same_side l1 x y = foldl1 (\acc n -> (is_same_side_ l1 x y n) * acc) [0..2]
-- works
is_same_side l1 x y = (is_same_side_ l1 x y 0) * (is_same_side_ l1 x y 1) * (is_same_side_ l1 x y 2)
*Main> y = -1
*Main> y=-1
<interactive>:195:2: error:
• Variable not in scope: (=-) :: Integer -> Integer -> t
• Perhaps you meant one of these:
‘-’ (imported from Prelude), ‘==’ (imported from Prelude)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment