Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    Yes it's possible in languages supporting function pointers or lambda functions. However, the result will not be as fast as what an optimizing compiler can generate. Commented Aug 18, 2017 at 21:11
  • 1
    @gnat it's more complex than a truth table, because the a() function could change the value of q under some circumstances. Commented Aug 18, 2017 at 21:15
  • @Christophe Good point about changing the value of q, but that doesn't happen in my case. Commented Aug 20, 2017 at 20:42