Skip to content

Instantly share code, notes, and snippets.

@lsparrish
Created January 10, 2010 00:13
Show Gist options
  • Save lsparrish/273222 to your computer and use it in GitHub Desktop.
Save lsparrish/273222 to your computer and use it in GitHub Desktop.
{{
: :find ( a-af ) last repeat @ 2dup =if drop @ -1 ;; else dup 0 =if ;then then again ;
: .vocab ( a- ) dup 1+ @ :find nip if shut else open then ;
---reveal---
: as-vocab ( a- ) last @ d->class ['] .vocab swap ! ;
}}
vocab foo ((
stub bar
stub baz
))
as-vocab
foo words
foo words
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment