factor/basis/sorting/human/human.factor

10 lines
327 B
Factor
Raw Normal View History

2008-09-12 16:49:46 -04:00
! Copyright (C) 2008 Doug Coleman, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
2009-04-03 18:28:31 -04:00
USING: math.parser peg.ebnf sorting.functor ;
2008-09-12 16:49:46 -04:00
IN: sorting.human
: find-numbers ( string -- seq )
[EBNF Result = ([0-9]+ => [[ string>number ]] | (!([0-9]) .)+)* EBNF] ;
2009-04-03 18:28:31 -04:00
<< "human" [ find-numbers ] define-sorting >>