Skip to content

Allow trailing function as last parameter #17

Open
@MatheusRich

Description

@MatheusRich
fn on_click { |btn, callback|
  # run the callback when the button is clicked
} 

on_click(my_btn) { puts("clicked!") }


fn map { |array, f|
  # for each element in array, apply f
}

map([1, 2, 3]) { |element| element * 2 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions