# Expression lists?

Oh darlin'

In a sky full of people, only some want to fly

Isn't that crazy

In a world full of people, only some want to fly

Isn't that crazy, crazy

In a heaven of people there's only some who want to fly

Ain't that crazy, oh babe, oh darlin'

In a world full of people there's only some want to fly

Isn't that crazy, isn't that crazy, isn't that crazy, isn't that crazy

- Crazy from Seal by Seal (1991)

Concurnas provides expression lists, this is a neat feature which enables a more natural way of writing expression related code that would otherwise have to be written as a set of chained together calls using the dot operator and/or function invocation brackets. Example:

class Myclass(b int){
def resolve(a int) => (a+b)*2
}

res = Myclass 4 resolve 4 //expression list
//res now resolves to 16


Concurnas interprets mc doit 4 to resolve to mc.dotit(4). Without expression lists the above would look like: mc.dotit(4). Concurnas will evaluate all possible interpretations of the defined expression list. If more than one valid interpretation is possible then this will be flagged up as an ambiguous compilation error which will require disambiguation (e.g. explicitly using the dot operator or function invocation arguments).

Combined with extension functions this affords us some very concise and powerful domain specific syntax.

def int min() = this*60*60

10 min//resolves to 3600 - which is the number of seconds in 10 minutes.


## Double dot and direct dot Operator?

Concurnas is able to interpret expression lists to make use of the double dot .. and direct dot \. operators in addition to the single dot .:

class MyClass{

}

mc = new MyClass()


### Element Precedence?

The elements of the expression list are themselves expected to be valid expressions. E.g. The below resolves to 16 and not 14 as the plus operator defined in the 2+2 expression is valid and takes precedence over the expression list.

class Myclass(b int){
def doit(a int) = (a+b)*2
}

mc = Myclass(4)
res = mc doit 2+2
//res is now 16