Changeset 16384 for src/Pugs/Prim/List.hs
- Timestamp:
- 05/17/07 23:45:31 (18 months ago)
- Files:
-
- 1 modified
-
src/Pugs/Prim/List.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Prim/List.hs
r15616 r16384 335 335 args <- fromVal list 336 336 arity <- fmap (length . subParams) (fromVal sub) 337 evl <- asks envEval338 vals <- mapMn args arity $ \x -> do337 evl <- asks envEval 338 vals <- mapMn args arity $ \x -> do 339 339 rv <- local (\e -> e{ envContext = cxtSlurpyAny }) $ do 340 340 evl (App (Val sub) Nothing (map Val x)) … … 344 344 -- Takes a list, an arity, and a function. 345 345 mapMn :: [Val] -> Int -> ([Val] -> Eval [Val]) -> Eval [Val] 346 mapMn list 0 f = fmap concat (mapM (const $ f []) list) 346 347 mapMn list n f = mapMn' (list2LoL n list) f 347 348 -- Takes a LoL and a function and applies the function to the inputlist.
