Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
»

infix ::

infix ::

(A 
type
, h A, f Unary A A)
 => 
list A
[Contains abstract features]
infix operator to create a list from head h and a production
function f

This can be used, e.g., as follows:

Ex1: the identity can be used to repeat the same element

1 :: x->x

will create 1,1,1,1,...

Ex2: To create a list of all integers, use

0 :: +1

which will produce 0,1,2,3,4,5,...

Ex3: The call

1 :: p->p+p

will produce the powers of two: 1,2,4,8,16,32,...

Type Parameters

0.094dev (2025-06-18 15:08:51 GIT hash 89cffc23ae669b0898a5564fefbf793fcb8e5ca7 built by fridi@fzen)