Paste: cleave macro

Author: m
Mode: factor
Date: Fri, 13 Aug 2010 10:00:00
Plain Text |
USING: combinators kernel math math.ranges sequences ;
IN: problem5

: divides? ( m n -- ? )
    mod 0 = ;

: init-funcs ( seq -- seq )
    [ [ divides? ] curry ] map ; inline

: divides-range? ( m a b -- ... )
    [a,b] init-funcs cleave ;

New Annotation

Summary:
Author:
Mode:
Body: