Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map.put_in_path #2

Open
8 tasks
paulbalomiri opened this issue Jul 4, 2017 · 0 comments
Open
8 tasks

Map.put_in_path #2

paulbalomiri opened this issue Jul 4, 2017 · 0 comments

Comments

@paulbalomiri
Copy link
Member

paulbalomiri commented Jul 4, 2017

Map.put_in_path should have the interface

  • Map.put_in_path(map, path, value, options)
  • Options:
  • fun a function with arguments (
    • :create_path, parents, key -> map
    • :create_value, parents, cur_value -> map
  • {:create_value, fun} where fun accepts parents, cur_value as arguments and returns value
  • {:create_path, fun} where fun accepts parents, key as arguments and returns the path element's value (%{} by default)
  • :replace: replaces the last element this is the default
  • :make_and_append_to_list
  • make_and_prepend_to_list
  • :append_list
  • :prepend_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant