Skip to content

argument

pannous edited this page Jul 4, 2022 · 3 revisions

arguments are parameters to functions and closures

In angle they can be symbolic and subject to structural matching

They take the same semantics of optional, required, constant and mutable as other variables:

to call person{name?, phone number, email?, mutable status} do
  telephone.dial person.phone
  person.status = called

unused optional fields can be omitted. Fields which are required in the callers object can be optional in the callees parameter and vice versa: an object of the following class can still be passed to the above call function:

class person{
name, 
phone?
}

since the name is always provided it is OK to fill the optional name? parameter of the call function however it is required to fill the phone parameter to call the function:

person john:{name:"Jonathan" phone:"899-573-5842"}
call john// ok
call person {name:"Dick"} //  compile error: missing argument field phone

default values are allowed on all parameters.

Angle seeks to encourage point-free (“argument-less”) tacit programming, especially by automatic broadcasting but also by (inverse) function composition via and & pipe.

Home

Philosophy

data & code blocks

features

inventions

evaluation

keywords

iteration

tasks

examples

todo : bad ideas and open questions

⚠️ specification and progress are out of sync

Clone this wiki locally