Changeset 14933 for src/Pugs/Prim/List.hs
- Timestamp:
- 12/21/06 04:43:12 (2 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Prim/List.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Prim/List.hs
r14927 r14933 2 2 3 3 module Pugs.Prim.List ( 4 op0Zip, op0C at, op0Each, op0RoundRobin, op1Pick, op1Sum,4 op0Zip, op0Cross, op0Cat, op0Each, op0RoundRobin, op1Pick, op1Sum, 5 5 op1Min, op1Max, op1Uniq, 6 6 op2Pick, … … 38 38 zipRest [] = [] 39 39 zipRest (_:xs) = xs 40 41 op0Cross :: [Val] -> Eval Val 42 op0Cross = fmap (VList . fmap VList . op0Cross') . mapM fromVal 43 44 op0Cross' :: [[Val]] -> [[Val]] 45 op0Cross' [] = [[]] 46 op0Cross' (xs:yss) = do 47 x <- xs 48 ys <- op0Cross' yss 49 return (x:ys) 40 50 41 51 op1Pick :: Val -> Eval Val
