Skip to content

Add built-in functions #8

@SkymanOne

Description

@SkymanOne

Follow-up for #7

Introduce generic built-in functions for operations on lists and safe maths:

  • map(list, func) -> List/Set<Generic<int, uint, float, address, hex, list, set>>
  • map(list, func) -> List/Set<Generic<int, uint, float, address, hex, list, set>>
  • add(list, item) -> List/Set<Generic<int, uint, float, address, hex, list, set>>
  • remove(list, item) -> List/Set<Generic<int, uint, float, address, hex, list, set>>
  • get(list, item) -> Generic<int, uint, float, address, hex, list, set>
  • handle(expression, func) -> Generic<int, uint, float> - for safe math operation
  • size(list) -> uint
  • keys(mapping) -> Set<Generic<int, uint, float, address, hex>>
  • value(mapping) -> list
  • insert(mapping, key, value) -> mapping
  • value(mapping, key) -> Generic<int, uint, float, address, hex, list, set>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions