Changeset 17865 for src/Pugs/Prim/List.hs
- Timestamp:
- 09/16/07 01:53:07 (14 months ago)
- Files:
-
- 1 modified
-
src/Pugs/Prim/List.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Prim/List.hs
r16573 r17865 5 5 op1Min, op1Max, op1Uniq, 6 6 op2Pick, 7 op2ReduceL, op2Reduce, op2Grep, op2 Map, op2Join,7 op2ReduceL, op2Reduce, op2Grep, op2First, op2Map, op2Join, 8 8 sortByM, 9 9 op1HyperPrefix, op1HyperPostfix, op2Hyper, … … 331 331 return $ VList vals 332 332 333 op2First :: Val -> Val -> Eval Val 334 op2First sub@(VCode _) list = op2First list sub 335 op2First list sub = do 336 (VList vals) <- (op2Grep list sub) 337 if (length vals) > 0 338 then return $ (vals !! 0) 339 else fail $ "Cannot call first() with a filter that removes all elements from the input list" 340 333 341 op2Map :: Val -> Val -> Eval Val 334 342 op2Map sub@(VCode _) list = op2Map list sub
