Paste: fry quot newbie example

Author: Ala'a
Mode: factor
Date: Mon, 6 Oct 2014 17:43:37
Plain Text |
USE: fry

: make-query ( string -- quot ) '[ 1 swap nth _ swap subseq? ] ;

: na? ( array -- ? ) "na" make-query ;

! sample date from a CSV file
{ "id" "fname" "lname" "age" }
na?

! I get the following error

! The word na? cannot be executed because it failed to compile
! Stack effect declaration is wrong
! inferred ( -- x )
! declared ( array -- ? )

New Annotation

Summary:
Author:
Mode:
Body: