Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Spot Spot
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 134
    • Issues 134
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • SpotSpot
  • SpotSpot
  • Issues
  • #306
Closed
Open
Issue created Nov 23, 2017 by Alexandre Duret-Lutz@adlOwner

formula::map should allow additional arguments

It would be nice if instead of just f.map(fun) we could write f.map(fun, args...); so that map calls fun(args); instead of fun();.

In particular, that would solve the problem of when fun need to capture some variable and has trouble calling itself recursively. Then we can write f.map(fun, fun) so that fun receives a pointer to itself as first arguments, or we car write f.map(fun, var1, var2) if fun is written to take the variables as argument instead of capturing them.

Assignee
Assign to
Time tracking