get parser-combinator code working with latest factor sequence changes
parent
089c17f401
commit
c93a28ffa2
|
@ -263,7 +263,7 @@ DEFER: list>llist
|
||||||
drop lnil
|
drop lnil
|
||||||
] ifte ;
|
] ifte ;
|
||||||
|
|
||||||
M: lcons nth lnth ;
|
! M: lcons nth lnth ;
|
||||||
|
|
||||||
: test1
|
: test1
|
||||||
[ 1 ] list>llist
|
[ 1 ] list>llist
|
||||||
|
|
|
@ -50,7 +50,7 @@ GENERIC: ptail
|
||||||
M: string ptail ( object -- tail )
|
M: string ptail ( object -- tail )
|
||||||
#! Polymorphic tail. Return the tail of the object.
|
#! Polymorphic tail. Return the tail of the object.
|
||||||
#! For a string this is everything but the first character.
|
#! For a string this is everything but the first character.
|
||||||
1 swap string-tail ;
|
1 swap tail ;
|
||||||
|
|
||||||
M: list ptail ( object -- tail )
|
M: list ptail ( object -- tail )
|
||||||
#! Polymorphic tail. Return the tail of the object.
|
#! Polymorphic tail. Return the tail of the object.
|
||||||
|
@ -96,7 +96,7 @@ M: list pempty? ( object -- bool )
|
||||||
dup length pick < [
|
dup length pick < [
|
||||||
2drop ""
|
2drop ""
|
||||||
] [
|
] [
|
||||||
string-head
|
head
|
||||||
] ifte ;
|
] ifte ;
|
||||||
|
|
||||||
: (list-take) ( n list accum -- list )
|
: (list-take) ( n list accum -- list )
|
||||||
|
@ -131,7 +131,7 @@ M: list ptake ( n object -- object )
|
||||||
dup length pick < [
|
dup length pick < [
|
||||||
2drop ""
|
2drop ""
|
||||||
] [
|
] [
|
||||||
string-tail
|
tail
|
||||||
] ifte ;
|
] ifte ;
|
||||||
|
|
||||||
: list-drop ( n list -- list )
|
: list-drop ( n list -- list )
|
||||||
|
|
Loading…
Reference in New Issue