Linked list and the ! Shortcut

This shortcut creates a Linked list.
A linked list is a LingoF datatype and it’s not the same as Lingo’s Linear and Property lists.
A linked list is more similar to a stack.
Why do we need to work with linked lists. We will cover many situations where they can be useful, but one of them is to create a Lingo list, of course not directly: a list as a function value or put it in another way: a function that will be evaluated to a list.
In LingoF module there are four basic linked list functions: Head, Tail, IsEmpty and Cons.

Cons concatenate one element (first parameter) to a list (second parameter).

IsEmpty, Head and Tail receive a list as unique parameter.

Head returns the list’s first element.

Leave a Reply

Security Code: