diff --git a/parsimony.cabal b/parsimony.cabal
--- a/parsimony.cabal
+++ b/parsimony.cabal
@@ -1,5 +1,5 @@
 name:           parsimony
-version:        1
+version:        1.0.1
 license:        BSD3
 license-file:   LICENSE
 author:         Daan Leijen <daan@cs.uu.nl>, Iavor S. Diatchki <iavor.diatchki@gmail.com>
@@ -14,7 +14,7 @@
     Like Parsec, it is simple, safe, well documented, convenient, 
     with good error messages, and fast.  In addition, Parsimony
     adds support for working with differet types of input such as
-    byte strings (for compact input representation) and
+    byte strings (for compat input representation) and
     lazy byte strings (for parsing large amounts of data).
     It also supports working with text in different character
     encodings such as UTF8.
diff --git a/src/Parsimony.hs b/src/Parsimony.hs
--- a/src/Parsimony.hs
+++ b/src/Parsimony.hs
@@ -29,7 +29,7 @@
   , manyTill
   , count
   , foldMany
-
+  
     -- * Optoinal content
   , option, optional
 
@@ -41,7 +41,7 @@
   , notFollowedBy, notFollowedBy'
   , lookAhead, anyToken
 
-    -- * Errors
+    -- * Errors 
   , (<?>), unexpected, empty, parseError, labels 
 
     -- * Parser State
@@ -53,7 +53,6 @@
 
     -- * Primitive Parsers
   , PrimParser
-  , Reply(..)
   , primParser
   ) where
 
diff --git a/src/Parsimony/Combinator.hs b/src/Parsimony/Combinator.hs
--- a/src/Parsimony/Combinator.hs
+++ b/src/Parsimony/Combinator.hs
@@ -65,7 +65,10 @@
 sepEndBy p sep      = option [] (sepEndBy1 p sep)
 
 sepEndBy1          :: Parser t a -> Parser t sep -> Parser t [a]
-sepEndBy1 p sep     = sepBy1 p sep <* optional sep
+sepEndBy1 p sep     = do x <- p
+                         reverse <$> foldManyWhile (flip (:)) [x] loopP
+  where
+  loopP = option Nothing (sep >> option Nothing (Just <$> p))
 
 -- directly recursive
 count              :: Int -> Parser t  a -> Parser t  [a]
diff --git a/src/Parsimony/Prim.hs b/src/Parsimony/Prim.hs
--- a/src/Parsimony/Prim.hs
+++ b/src/Parsimony/Prim.hs
@@ -16,7 +16,7 @@
   ( Parser, PrimParser, Reply(..)
   , runParser, primParser
   , parseError, try, lookAhead, labels
-  , foldMany, skipMany, match
+  , foldMany, foldManyWhile, skipMany, match
   , State(..), getState, updateState, mapState
   ) where
 
@@ -154,22 +154,54 @@
 
 {-# INLINE foldMany #-}
 foldMany :: (b -> a -> b) -> b -> Parser t a -> Parser t b
-foldMany cons nil p = P (outer nil)
+foldMany cons nil p = P $ \s ->
+  case unP p s of
+    R False (Ok {})     -> crash "Parsimony.foldMany"
+    R False (Error _)   -> R False $ Ok nil s
+    R True  (Ok x s1)   -> R True  $ (walk $! cons nil x) s1
+    R True  (Error err) -> R True  $ Error err
+
+  -- NOTE: this is written like this because after the first iteration
+  -- we already know weather the parser will be consuming input.
   where
-  -- not consumed
-  outer xs s =
+  walk xs s =
     case unP p s of
-      R False (Ok x s1)   -> (outer $! cons xs x) s1
-      R False (Error _)   -> R False $ Ok xs s
-      R True  (Ok x s1)   -> R True  $ (inner $! cons xs x) s1
-      R True  (Error err) -> R True  $ Error err
+      R False (Ok {})   -> crash "Parsimony.foldMany"
+      R False (Error _) -> Ok xs s
+      R True  (Ok x s1) -> (walk $! cons xs x) s1
+      R True  (Error e) -> Error e
 
-  -- consumed
-  inner xs s =
+
+-- | Apply a parser repeatedly, combining the results with the
+-- given functions.  This function is similar to the strict 'foldl'.
+-- We stop on one of the following conditions:
+--   * an application of the parser fails without consuming any input,
+--   * the pearser returns 'Nothing' as a result.
+-- If the parser fails after it has consumed some input, then
+-- the repeated parser will also fail.
+
+{-# INLINE foldManyWhile #-}
+foldManyWhile :: (b -> a -> b) -> b -> Parser t (Maybe a) -> Parser t b
+foldManyWhile cons nil p = P $ \s ->
+  case unP p s of
+    R False (Ok Nothing _)   -> R False $ Ok nil s
+    R False (Ok {})          -> crash "Parsimony.foldManyWhile"
+    R False (Error _)        -> R False $ Ok nil s
+    R True  (Ok Nothing s1)  -> R True  $ Ok nil s1
+    R True  (Ok (Just x) s1) -> R True  $ (walk $! cons nil x) s1
+    R True  (Error err)      -> R True  $ Error err
+
+  -- NOTE: this is written like this because after the first iteration
+  -- we already know weather the parser will be consuming input.
+  where
+  walk xs s =
     case unP p s of
-      R _ (Ok x s1)       -> (inner $! cons xs x) s1
-      R False (Error _)   -> Ok xs s
-      R True  (Error e)   -> Error e
+      R False (Ok Nothing _)    -> Ok xs s
+      R False (Ok {})           -> crash "Parsimony.foldManyWhile"
+      R False (Error _)         -> Ok xs s
+      R True  (Ok Nothing s1)   -> Ok xs s1
+      R True  (Ok (Just x) s1)  -> (walk $! cons xs x) s1
+      R True  (Error e)         -> Error e
 
 
 -- | Apply a parser repeatedly, ignoring the results.
@@ -179,23 +211,23 @@
 
 {-# INLINE skipMany #-}
 skipMany :: Parser t a -> Parser t ()
-skipMany p = P outer
+skipMany p = P $ \s ->
   -- pFold specialized for a common case
 
+  case unP p s of
+    R False (Ok {})     -> crash "Parsimony.skipMany"
+    R False (Error _)   -> R False $ Ok () s
+    R True  (Ok _ s1)   -> R True  $ walk s1
+    R True  (Error err) -> R True  $ Error err
+
   -- NOTE: this is written like this because after the first iteration
   -- we already know weather the parser will be consuming input.
   where
-  outer s =
-    case unP p s of
-      R False (Ok _ s1)   -> outer s1
-      R False (Error _)   -> R False $ Ok () s
-      R True  (Ok _ s1)   -> R True  $ inner s1
-      R True  (Error err) -> R True  $ Error err
-
-  inner s =
+  walk s =
     case unP p s of
-      R _ (Ok _ s1)     -> inner s1
+      R False (Ok {})   -> crash "Parsimony.skipMany"
       R False (Error _) -> Ok () s
+      R True  (Ok _ s1) -> walk s1
       R True  (Error e) -> Error e
 
 
@@ -235,6 +267,10 @@
       R _ (Error e) -> Error e
 
 
+
+-- | We use to let the user know that we have entered an infinity loop.
+crash :: String -> a
+crash f = error $ f ++ " applied to a parser that accepts the empty string."
 
 -- Instances -------------------------------------------------------------------
 
diff --git a/src/Parsimony/Stream.hs b/src/Parsimony/Stream.hs
--- a/src/Parsimony/Stream.hs
+++ b/src/Parsimony/Stream.hs
@@ -17,7 +17,7 @@
 
 
 
-module Parsimony.Stream
+module Parsimony.Stream 
   ( Token(..), Stream(..)
   , ASCII, UTF8, ascii, utf8
   ) where
