     
 : 3car ( cons -- car caar caaar )    
     [ car ] [ cdr car ] [ cdr cdr car ] tri ;
-    
-: uncons ( cons -- cdr car )
-    [ cdr ] [ car ] bi ;
 
 : lnth ( n list -- elt )
     swap [ cdr ] times car ;

    over nil? [ 2drop ] [ [ uncons ] dip tuck call leach ] if ; inline
    
: lreduce ( list identity quot -- result )
    swapd leach ; inline
    
: (lmap) ( acc cons quot -- seq )    
    over nil? [ 2drop ]
    [ [ uncons ] dip [ call ] keep swapd [ suffix ] 2dip (lmap) ] if ; inline
    
: lmap ( cons quot -- seq )
    [ { } clone ] 2dip (lmap) ; inline
    
: lmap-as ( cons quot exemplar -- seq )
    [ lmap ] dip like ;


: nil ( -- cons )
  T{ cons f f f } ;
    
: uncons ( cons -- cdr car )
    [ cdr ] [ car ] bi ;

M: cons nil? ( cons -- ? )
    uncons and not ;
    
: 1list ( obj -- cons )
    nil cons ;
    
