Delete cruft, add Reader monad to some internal ai
This commit is contained in:
+4
-4
@@ -17,17 +17,17 @@ left (DS (_,l,_)) = l
|
||||
right (DS (_,_,r)) = r
|
||||
|
||||
pushL :: DS a -> DS a
|
||||
pushL (DS (x,xs,(y:ys))) = DS (y,(x:xs),ys)
|
||||
pushL (DS (x,xs, y:ys )) = DS (y, x:xs ,ys)
|
||||
pushL ds = ds
|
||||
|
||||
pushR :: DS a -> DS a
|
||||
pushR (DS (y,(x:xs),ys)) = DS (x,xs,(y:ys))
|
||||
pushR (DS (y, x:xs ,ys)) = DS (x,xs, y:ys )
|
||||
pushR ds = ds
|
||||
|
||||
cycleL :: DS a -> Maybe (DS a)
|
||||
cycleL (DS (x,xs,(y:ys))) = Just $ DS (y,(x:xs),ys)
|
||||
cycleL (DS (x,xs, y:ys )) = Just $ DS (y, x:xs ,ys)
|
||||
cycleL _ = Nothing
|
||||
|
||||
cycleR :: DS a -> Maybe (DS a)
|
||||
cycleR (DS (y,(x:xs),ys)) = Just $ DS (x,xs,(y:ys))
|
||||
cycleR (DS (y, x:xs ,ys)) = Just $ DS (x,xs, y:ys )
|
||||
cycleR _ = Nothing
|
||||
|
||||
Reference in New Issue
Block a user