Merge branch 'master' of git://factorcode.org/git/factor

db4
Slava Pestov 2009-04-23 22:37:19 -05:00
commit e6a6ac035b
7 changed files with 60 additions and 0 deletions

View File

@ -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." } ;

View File

@ -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

View File

@ -0,0 +1,5 @@
! (c)2009 Joe Groff, see bsd license
USING: kernel ;
IN: booleans
UNION: boolean POSTPONE: t POSTPONE: f ;

1
extra/env/authors.txt vendored Normal file
View File

@ -0,0 +1 @@
Joe Groff

13
extra/env/env-docs.factor vendored Normal file
View File

@ -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"

26
extra/env/env.factor vendored Normal file
View File

@ -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 ;

1
extra/env/summary.txt vendored Normal file
View File

@ -0,0 +1 @@
Access environment variables via the assoc protocol