Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (...|---|.-.|-) :: (Ord (.-)) => (-.-.) -> (-...) -> [(.-)] -> [(.-)] -> [(.-)]
- (...|---|.-.|-) (--..) (.--) (.-..|-..-)@((-..-):(-..-|...)) (.-..|-.--)@[] = if ((-.|..-|.-..|.-..) (.-..|-.--)) then (.-..|-..-) else (.-..|-.--)
- (...|---|.-.|-) (.--.) (--.-) (.-..|-..-)@[] (.-..|-.--)@((-.--):(-.--|...)) = if ((-.|..-|.-..|.-..) (.-..|-..-)) then (.-..|-.--) else (.-..|-..-)
- (...|---|.-.|-) (.-) (...) (.-..|-..-)@((-..-):(-..-|...)) (.-..|-.--)@((-.--):(-.--|...)) | (-..-) < (-.--) = (-..-):((...|---|.-.|-) (.-) (...) (-..-|...) (.-..|-.--))
- | (---|-|....|.|.-.|.--|..|...|.) = (-.--):((...|---|.-.|-) (...) (.-) (.-..|-..-) (-.--|...))
- (---|-.|.|...|-|.|.--.) :: (Ord (.-)) => [(.-)] -> [(.-)]
- (---|-.|.|...|-|.|.--.) (.-..) | ((.-..|.|-.|--.|-|....) (.-..)) < 2 = (.-..)
- | (---|-|....|.|.-.|.--|..|...|.) = (...|---|.-.|-) (.-..|.|..-.|-) (.-.|..|--.|....|-) ((---|-.|.|...|-|.|.--.) (-...|..|--.)) ((---|-.|.|...|-|.|.--.) (...|--|.-|.-..|.-..))
- where ((-...|..|--.), (...|--|.-|.-..|.-..)) = (-.-.|---|-.|-|.-|..|-.|...|.+|.-..|.|--) (.-..)
- (.-..|.|..-.|-) = (.-..|.|-.|--.|-|....) (-...|..|--.)
- (-.-.|---|-.|-|.-|..|-.|...|.+|.-..|.|--) = (...|.--.|.-..|..|-|.-+|-) ((.-..|.|-.|--.|-|....) (.-..) --.-|..-|---|- 2)
- (.-.|..|--.|....|-) = (.-..|.|-.|--.|-|....) (...|--|.-|.-..|.-..)
- main = do
- (.--.|.-.|..|-.|-) $ (---|-.|.|...|-|.|.--.) [2, 3, 4, 1, 4, 9, 83]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement