Changeset 2968 for src/Pugs/Prim/List.hs

Show
Ignore:
Timestamp:
05/11/05 16:19:49 (4 years ago)
Author:
bsmith
svk:copy_cache_prev:
4536
Message:

Misc refactoring within Pugs.Prim and Pugs.AST. Factored eval primitives
to Pugs.Prim.Eval. Removed Pugs.Cont from Pugs.Internals.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/List.hs

    r2961 r2968  
    1111import Pugs.Prim.Numeric 
    1212 
    13 op0Zip :: [[Val]] -> [[Val]] 
    14 op0Zip lists | all null lists = [] 
    15 op0Zip lists = (map zipFirst lists):(op0Zip (map zipRest lists)) 
     13op0Zip = fmap (VList . concat . op0Zip') . mapM fromVal 
     14 
     15op0Zip' :: [[Val]] -> [[Val]] 
     16op0Zip' lists | all null lists = [] 
     17op0Zip' lists = (map zipFirst lists):(op0Zip' (map zipRest lists)) 
    1618    where 
    1719    zipFirst []     = undef