load help;

@[name]
dao.module
@[name]

@[title]
Built-in Modules
@[title]



@[name]
dao.module.std
@[name]

@[title]
Built-in Standard Module
@[title]

@[text]
@[code]
path( path :string, action :enum<set,add,remove>=$add )
compile( source :string )
eval( source :string, st=io::stdio, safe=0 )=>any
load( file :string, import=1, runim=0, safe=0 )=>any
resource( path :string )=>string
argv() => list<any>
about( ... )=>string
callable( object )=>int
debug( ... )
warn( info :string )
error( info :string )
gcmax( limit=0 )=>int/*by default, return the current value;*/
gcmin( limit=0 )=>int
subtype( obj1, obj2 )=>int
version()=>string

iterate( times :int )[index:int]
string( size :int, type :enum<mbs,wcs>=$mbs )[index:int =>int] =>string
array( D1 :int, D2 =0, D3 =0 )[I:int, J:int, K:int =>@V<@T<int|float|double|complex>|array<@T>>] =>array<@T>
list( size :int )[index:int =>@T] =>list<@T>
list( size :int, init :@T )[index:int, prev:@T =>@T] =>list<@T>
map( size :int, hashing = 0 )[index:int =>tuple<@K,@V>] =>map<@K,@V>
@[code]
@[text]








@[name]
dao.module.io
@[name]

@[title]
Built-in IO (Input/Output) Module
@[title]


@[name]
dao.module.io.method
@[name]

@[title]
IO Module Methods
@[title]

@[text]
@[code]
write( ... )
writef( format : string, ... )
writeln( ... )
read( )=>string
read( file : string, silent=0 )=>string
open( )=>stream
open( file :string, mode :string )=>stream
sstream( type :enum<mbs, wcs> = $mbs )=>stream

readlines( file :string, chop=0 )[line:string=>none|@T]=>list<@T>
@[code]
@[text]


@[name]
dao.module.io.stream
@[name]

@[title]
IO Stream Type
@[title]

@[name]
dao.module.io.stream.method
@[name]

@[title]
IO Stream Methods
@[title]

@[text]
@[code]
stream( )=>stream
stream( type :enum<mbs, wcs> )=>stream
stream( file :string, mode :string )=>stream
write( self :stream, ... )
writef( self :stream, format : string, ... )
writeln( self :stream, ... )
flush( self :stream )
read( self :stream, count=0 )=>string
read( self :stream, quantity :enum<line, all> )=>string
getstring( self :stream )=>string
close( self :stream )
eof( self :stream )=>int
isopen( self :stream )=>int
seek( self :stream, pos :int, from :enum<begin,current,end> )=>int
tell( self :stream )=>int
fileno( self :stream )=>int
name( self :stream )=>string
mode( self :stream )=>enum<read; write>
__for_iterator__( self :stream, iter : for_iterator )
[]( self :stream, iter : for_iterator )=>string

readlines( self :stream, numline=0, chop=0 )[line:string=>none|@T]=>list<@T>
// Not particularly useful, may be removed!
writelines( self :stream, lines :int)[line:int =>string]
writelines( file :string, lines :int)[line:int =>string]
@[code]
@[text]










@[name]
dao.module.mt
@[name]

@[title]
Built-in Multi-threading Module
@[title]


@[text]


@[subsection]
Mutex Methods
@[subsection]

@[code]
mutex()=>mutex
lock( self : mutex )
unlock( self : mutex )
trylock( self : mutex )=>int
protect( self : mutex )[]
@[code]


@[subsection]
Condition Variable Methods
@[subsection]

@[code]
condition()=>condition
wait( self : condition, mtx : mutex )
timedwait( self : condition, mtx : mutex, seconds :float )=>int
signal( self : condition )
broadcast( self : condition )
@[code]


@[subsection]
Semaphore Methods
@[subsection]

@[code]
semaphore( value = 0 )=>semaphore
wait( self : semaphore )
post( self : semaphore )
setvalue( self : semaphore, n :int )
getvalue( self : semaphore )=>int
protect( self : semaphore )[]
@[code]


@[subsection]
Module Methods
@[subsection]

@[code]
critical()[]
start( when : enum<auto,now> = $auto )[=>@V] =>future<@V>
iterate( times :int, threads=2 )[index:int,threadid:int]

iterate( alist :list<@T>, threads=2 )[item:@T,index:int,threadid:int]
map( alist :list<@T>, threads=2 )[item:@T,index:int,threadid:int =>@T2] =>list<@T2>
apply( alist :list<@T>, threads=2 )[item:@T,index:int,threadid:int =>@T] =>list<@T>
find( alist :list<@T>, threads=2 )[item:@T,index:int,threadid:int =>int] =>tuple<index:int,item:@T>|none

iterate( amap :map<@K,@V>, threads=2 )[key:@K,value:@V,threadid:int]
map( amap :map<@K,@V>, threads=2 )[key:@K,value:@V,threadid:int =>@T] =>list<@T>
apply( amap :map<@K,@V>, threads=2 )[key:@K,value:@V,threadid:int =>@V] =>map<@K,@V>
find( amap :map<@K,@V>, threads=2 )[key:@K,value:@V,threadid:int =>int] =>tuple<key:@K,value:@V>|none

iterate( aarray :array<@T>, threads=2 )[item:@T,I:int,J:int,K:int,L:int,M:int,threadid:int]
map( aarray :array<@T>, threads=2 )[item:@T,I:int,J:int,K:int,L:int,M:int,threadid:int =>@T2] =>array<@T2>
apply( aarray :array<@T>, threads=2 )[item:@T,I:int,J:int,K:int,L:int,M:int,threadid:int =>@T] =>array<@T>
@[code]





@[text]
