Permalink
Browse files

Choice.

  • Loading branch information...
1 parent 829091d commit 4ba0eed525313c62493a0017e2213668246167b0 @mbrubeck committed Oct 12, 2009
Showing with 3 additions and 0 deletions.
  1. +3 −0 Completer.hs
View
3 Completer.hs
@@ -1,6 +1,9 @@
data Completion = Tokens [String] | Suggestions [String]
type Completer = [String] -> [Completion]
+(<|>) :: Completer -> Completer -> Completer
+c <|> d = \ts -> c ts ++ d ts
+
(-->) :: Completer -> Completer -> Completer
c --> d = \ts -> concat [ case result of
Tokens ts' -> d ts'

0 comments on commit 4ba0eed

Please sign in to comment.