Skip to content

Add array utility functions #8

@dev-dami

Description

@dev-dami

Description

Need more array manipulation functions in the standard library.

Suggested Functions

  • map(arr, fn) - Transform each element
  • filter(arr, fn) - Filter elements by predicate
  • reduce(arr, fn, initial) - Reduce to single value
  • find(arr, fn) - Find first matching element
  • contains(arr, element) - Check if element exists
  • reverse(arr) - Reverse array
  • sort(arr) - Sort array

Where to Start

  • pkg/eval/builtins.go - Add builtin function implementations
  • May need to handle function arguments (closures)

Good First Issue

Great for newcomers! Start with simpler ones like contains, reverse, then work up to map/filter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions