# Proper way to define functions with additional parameters

**URL:** https://discourse.julialang.org/t/proper-way-to-define-functions-with-additional-parameters/94656
**Category:** New to Julia
**Created:** [February 14, 2023, 11:41pm UTC](https://discourse.julialang.org/t/proper-way-to-define-functions-with-additional-parameters/94656 "2023-02-14T23:41:18Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![jinfreedom](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jinfreedom](https://discourse.julialang.org/u/jinfreedom)
#### Post date: [February 15, 2023, 12:05am UTC](https://discourse.julialang.org/t/proper-way-to-define-functions-with-additional-parameters/94656/4 "2023-02-15T00:05:00Z")

</div>

Thanks for the feedback. I get that there is nothing non “julian” with anonymous functions. However, I did run into broadcast over `CuArray` problems if the parameters are not explicitly constant, even though they come from an immutable `struct`, as [this post](https://discourse.julialang.org/t/broadcast-over-cuarray-error/94654) indicates. Wondering if there is a way though …

---

_[View the full topic](https://discourse.julialang.org/t/proper-way-to-define-functions-with-additional-parameters/94656)._
