{-
(Polygon pts) `containsS` p
= let leftOfList = map isLeftOfp (zip pts (tail pts ++ [head pts]))
isLeftOfp p' = isLeftOf p p'
in and leftOfList
-}
{-
(Polygon pts) `containsS` p
= let leftOfList = map isLeftOfp (zip pts (tail pts ++ [head pts]))
isLeftOfp = isLeftOf p -- eta reduction
in and leftOfList
-}
(Polygon pts) `containsS` p
= and $ map (isLeftOf p) (zip pts (tail pts ++ [head pts]))
This entry was posted
on Tuesday, June 5th, 2007 at 5:01 pm and is filed under Haskell - SOE.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.