Pluvo Library Functions

This is a guide to the library program functions of Pluvo. These variables must be accessed with the "@" namespace sigil. For an introduction to Pluvo, try the Guide to Pluvo instead. Feel free to ask questions about this document on the Pluvo mailing list.

@abs n
Returns the positive version of the Number n, whether n is positive or negative. Examples:
>> @abs -5
5
>> @abs 3
3
>> @abs { 3 - 5 }
-2
@grandparent
Returns the grandparent block, that is the block containing the block containing the current command. Example:
>> # This is a comment
>> say
>>    block = { @grandparent }
>>    block = { @quote block }
>>    block:"comment" 
This is a comment
@parent
Return the parent block of the current block. Example:
>> this = { @parent }
@quote block
Remove functional attributed from block, with the effect of making it inert as an evaluable object. Example:
>> {block} = { 5 + 3 }
>> say {{{ @quote block }:0}:0}
5
@sqrt n
Return the square root of n. Examples:
>> say { @sqrt 25 }
5
>> say { @sqrt 49 }
7
@stack
Return the current stack of blocks as a Table. Example:
>> test = (argv)
>>    $stack = { @stack }
>>    say { { $stack:1 }:"kind" }
>> test
Function

These functions are just the variables that are available only using the program variables namespace sigil, "@". There are many basic functions that you can use without the "@" character.

Sean B. Palmer, inamidst.com