Merge branch 'master' of git://factorcode.org/git/factor
commit
e6a6ac035b
|
@ -0,0 +1,7 @@
|
|||
! (c)2009 Joe Groff, see bsd license
|
||||
USING: help.markup help.syntax ;
|
||||
IN: booleans
|
||||
|
||||
HELP: boolean
|
||||
{ $class-description "A union of the " { $link POSTPONE: t } " and " { $link POSTPONE: f } " classes." } ;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
! (c)2009 Joe Groff, see bsd license
|
||||
USING: booleans tools.test ;
|
||||
IN: booleans.tests
|
||||
|
||||
[ t ] [ t boolean? ] unit-test
|
||||
[ t ] [ f boolean? ] unit-test
|
||||
[ f ] [ 1 boolean? ] unit-test
|
|
@ -0,0 +1,5 @@
|
|||
! (c)2009 Joe Groff, see bsd license
|
||||
USING: kernel ;
|
||||
IN: booleans
|
||||
|
||||
UNION: boolean POSTPONE: t POSTPONE: f ;
|
|
@ -0,0 +1 @@
|
|||
Joe Groff
|
|
@ -0,0 +1,13 @@
|
|||
! (c)2009 Joe Groff, see bsd license
|
||||
USING: help.markup help.syntax ;
|
||||
IN: env
|
||||
|
||||
HELP: env
|
||||
{ $class-description "A singleton that implements the " { $link "assocs-protocol" } " over " { $link "environment" } "." } ;
|
||||
|
||||
ARTICLE: "env" "Accessing the environment via the assoc protocol"
|
||||
"The " { $vocab-link "env" } " vocabulary defines a " { $link env } " word which implements the " { $link "assocs-protocol" } " over " { $link "environment" } "."
|
||||
{ $subsection env }
|
||||
;
|
||||
|
||||
ABOUT: "env"
|
|
@ -0,0 +1,26 @@
|
|||
! (c)2009 Joe Groff, see bsd license
|
||||
USING: assocs environment kernel sequences ;
|
||||
IN: env
|
||||
|
||||
SINGLETON: env
|
||||
|
||||
INSTANCE: env assoc
|
||||
|
||||
M: env at*
|
||||
drop os-env dup >boolean ;
|
||||
|
||||
M: env assoc-size
|
||||
drop (os-envs) length ;
|
||||
|
||||
M: env >alist
|
||||
drop os-envs >alist ;
|
||||
|
||||
M: env set-at
|
||||
drop set-os-env ;
|
||||
|
||||
M: env delete-at
|
||||
drop unset-os-env ;
|
||||
|
||||
M: env clear-assoc
|
||||
drop os-envs keys [ unset-os-env ] each ;
|
||||
|
|
@ -0,0 +1 @@
|
|||
Access environment variables via the assoc protocol
|
Loading…
Reference in New Issue