Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by legobmw99

8 months ago

Is there a technical reason to now allow closures as the integrand?

2 comments

legobmw99

Reply

n_plus_1_acc  8 months ago

Mayve because they aren't guaranteed to be actual functions (in the mathematical sense) and could return random values

  • legobmw99  8 months ago

    The Fn trait could be used, which prevents mutation, but allows a lot of useful closures. I should note, a motivated user could provide a junk function no matter what the type accepted is

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities