# How best to enfold stable parameter values

**URL:** <https://discourse.julialang.org/t/how-best-to-enfold-stable-parameter-values/4222>\
**Category:** General Usage\
**Created:** [June 12, 2017, 12:11pm UTC](https://discourse.julialang.org/t/how-best-to-enfold-stable-parameter-values/4222 "2017-06-12T12:11:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [June 12, 2017, 12:11pm UTC](https://discourse.julialang.org/t/how-best-to-enfold-stable-parameter-values/4222/1 "2017-06-12T12:11:27Z")

</div>

A very general function for short-windowed timeseries smoothing would have a handful of algorithmically subselective params and other args that influence the behavior. Most uses/users will adopt a few styles and keep using them. There are still active parameters (window size, strength of the recent over the past), just fewer. And that makes their use easier.

Instead of encouraging the users to wrap their decisions in an outer function and so lower the arg count, I want to provide a way for the functions themselves [or their associated cleanup crew] to consume these decided values and provide the simplified interface thereafter.

Autogeneration of partial applicands or type-with-memory realizing value-persistant closures seem plausible paths. Others may be better, and in any event I do not know the key steps for either. Ideas?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [June 13, 2017, 11:21am UTC](https://discourse.julialang.org/t/how-best-to-enfold-stable-parameter-values/4222/2 "2017-06-13T11:21:11Z")

</div>

Keyword arguments?

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [June 13, 2017, 3:45pm UTC](https://discourse.julialang.org/t/how-best-to-enfold-stable-parameter-values/4222/3 "2017-06-13T15:45:26Z")

</div>

I like that.
