Advertisement
Guest User

Untitled

a guest
May 28th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (...|---|.-.|-) :: (Ord (.-)) => (-.-.) -> (-...) -> [(.-)] -> [(.-)] -> [(.-)]
  2. (...|---|.-.|-) (--..) (.--) (.-..|-..-)@((-..-):(-..-|...)) (.-..|-.--)@[] = if ((-.|..-|.-..|.-..) (.-..|-.--)) then (.-..|-..-) else (.-..|-.--)
  3. (...|---|.-.|-) (.--.) (--.-) (.-..|-..-)@[] (.-..|-.--)@((-.--):(-.--|...)) = if ((-.|..-|.-..|.-..) (.-..|-..-)) then (.-..|-.--) else (.-..|-..-)
  4. (...|---|.-.|-) (.-) (...) (.-..|-..-)@((-..-):(-..-|...)) (.-..|-.--)@((-.--):(-.--|...)) | (-..-) < (-.--) = (-..-):((...|---|.-.|-) (.-) (...) (-..-|...) (.-..|-.--))
  5.                              | (---|-|....|.|.-.|.--|..|...|.) = (-.--):((...|---|.-.|-) (...) (.-) (.-..|-..-) (-.--|...))
  6.  
  7. (---|-.|.|...|-|.|.--.) :: (Ord (.-)) => [(.-)] -> [(.-)]
  8. (---|-.|.|...|-|.|.--.) (.-..) | ((.-..|.|-.|--.|-|....) (.-..)) < 2 = (.-..)
  9.           | (---|-|....|.|.-.|.--|..|...|.) = (...|---|.-.|-) (.-..|.|..-.|-) (.-.|..|--.|....|-) ((---|-.|.|...|-|.|.--.) (-...|..|--.)) ((---|-.|.|...|-|.|.--.) (...|--|.-|.-..|.-..))
  10.   where ((-...|..|--.), (...|--|.-|.-..|.-..)) = (-.-.|---|-.|-|.-|..|-.|...|.+|.-..|.|--) (.-..)
  11.         (.-..|.|..-.|-) = (.-..|.|-.|--.|-|....) (-...|..|--.)
  12.         (-.-.|---|-.|-|.-|..|-.|...|.+|.-..|.|--) = (...|.--.|.-..|..|-|.-+|-) ((.-..|.|-.|--.|-|....) (.-..) --.-|..-|---|- 2)
  13.         (.-.|..|--.|....|-) = (.-..|.|-.|--.|-|....) (...|--|.-|.-..|.-..)
  14.  
  15. main = do
  16.   (.--.|.-.|..|-.|-) $ (---|-.|.|...|-|.|.--.) [2, 3, 4, 1, 4, 9, 83]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement