# Passing a pure fucntion

**URL:** <https://community.wolfram.com/t/passing-a-pure-fucntion/19542>\
**Category:** Questions\
**Tags:** mathematica\
**Created:** [February 3, 2022, 1:06am UTC](https://community.wolfram.com/t/passing-a-pure-fucntion/19542 "2022-02-03T01:06:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgolber](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@dgolber](https://community.wolfram.com/u/dgolber)\
**Post date:** [February 3, 2022, 1:06am UTC](https://community.wolfram.com/t/passing-a-pure-fucntion/19542/1 "2022-02-03T01:06:06Z")

</div>

Note that f is a global. It evaluates correctly, but not if passed to findPt.

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/7e7bbfa7-2b89-4bc4-9911-ecb8e585641f)

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [February 3, 2022, 2:19am UTC](https://community.wolfram.com/t/passing-a-pure-fucntion/19542/2 "2022-02-03T02:19:31Z")

</div>

Hi David,

I am unable to reproduce the result. `makePlane`, `findPt[f] `and `f[1,2]` all evaluate to

```
1.5 + 2. x - 1. y

```

Try with a fresh kernel.

---

<div class="post-metadata">

**Author:** ![dgolber](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@dgolber](https://community.wolfram.com/u/dgolber)\
**Post date:** [February 3, 2022, 6:00pm UTC](https://community.wolfram.com/t/passing-a-pure-fucntion/19542/3 "2022-02-03T18:00:48Z")

</div>

You are right: when I started with a clean kernel, I got what you got.  
But I found that the following works. Note that g, x, and y are all locals, but passing g works.

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/0fdeb0aa-9bd3-429d-80e8-cef937a9bfce)
