|
@@ -30,10 +30,21 @@ module Data.SCargot.Repr.WellFormed
|
|
|
import Control.Applicative ((<$>), (<*>), pure)
|
|
|
import Data.SCargot.Repr as R
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
uncons :: WellFormedSExpr a -> Maybe (WellFormedSExpr a, WellFormedSExpr a)
|
|
|
uncons R.WFSAtom {} = Nothing
|
|
|
uncons (R.WFSList (x:xs)) = Just (x, R.WFSList xs)
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
cons :: WellFormedSExpr a -> WellFormedSExpr a -> Maybe (WellFormedSExpr a)
|
|
|
cons _ (R.WFSAtom {}) = Nothing
|
|
|
cons x (R.WFSList xs) = Just (R.WFSList (x:xs))
|