Skip to content

Instantly share code, notes, and snippets.

@thomaskern
Created June 2, 2012 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomaskern/e22c54656e8088d1376a to your computer and use it in GitHub Desktop.
Save thomaskern/e22c54656e8088d1376a to your computer and use it in GitHub Desktop.
i define
(defn action-data [dir]
(let [source (lfs-textline dir)]
(<- [?p ?a ] (source ?line) (re-parse [#"[^\s]+"] ?line :> ?p ?a)
(:distinct false))))
i execute
(let [foo (action-data "testdata.txt")] foo)
i get
{:type :generator, :id "c8f930a6-26b4-4a94-815e-90b6d4b15a7f", :join-set-var nil, :ground? true, :sourcemap {"84e2b8dd-3a98-44ba-9618-dac650d31f48" #<Lfs Lfs["TextLine[['line']->[ALL]]"]["testdata.txt"]"]>}, :pipe #<Each Each(cf9a0454-1844-43be-901e-90ec3c01b723)[Identity[decl:ARGS]]>, :outfields ["?p" "?a"], :trapmap {}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment