Skip to content

Make vecs2 more gentle #2221

Open
Open
@daniel-pfeiffer

Description

@daniel-pfeiffer

vec_map_example is a bit much! It is not pretty printed across multiple lines. The next function is more readable than this 1st contact with iter.

Also I would separate

// An anonymous function, called a closure, which we store in a variable.
let my_closure = |element| element + 1;

Not sure if it should be called a lambda, when it doesn’t even close over anything. That name would be more familiar to many. OTOH, lambda has been hijacked for something unrelated by cloud providers.

Also, Ctrl-clicking on the 1st error message, jumps straight to the 3rd function. This leap-frogs the intended learning curve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions