# Horner rule

**URL:** <https://discourse.julialang.org/t/horner-rule/7504>\
**Category:** General Usage\
**Tags:** metaprogramming\
**Created:** [December 4, 2017, 6:29pm UTC](https://discourse.julialang.org/t/horner-rule/7504 "2017-12-04T18:29:09Z")\
**Posts on this page:** 7\
**Page:** 3

<div class="post-metadata">

**Author:** ![swissr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/swissr/32/208_2.png) [@swissr](https://discourse.julialang.org/u/swissr)\
**Post date:** [December 4, 2017, 10:47pm UTC](https://discourse.julialang.org/t/horner-rule/7504/41 "2017-12-04T22:47:07Z")

</div>

I wanted to write the same, but now, looking at the code (`@edit dump(r)`) I found a maxdepth argument 😍

```
dump(r, maxdepth = 20)

```

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihnorton/32/26_2.png) [@ihnorton](https://discourse.julialang.org/u/ihnorton)\
**Post date:** [December 4, 2017, 11:01pm UTC](https://discourse.julialang.org/t/horner-rule/7504/42 "2017-12-04T23:01:20Z")

</div>

> [@swissr](#):
>
> I wanted to write the same, but now, looking at the code (@edit dump(r)) I found a maxdepth argument

Cool, was looking for exactly that!

~~(good opportunity for a first PR if anyone wants to edit the documentation … … … … … 😄)~~: (edit: documented on trunk [document maxdepth keyword for dump (#24288) by jw3126 · Pull Request #24378 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/24378))

---

<div class="post-metadata">

**Author:** ![evanfields](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evanfields/32/1744_2.png) [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Post date:** [December 5, 2017, 12:04am UTC](https://discourse.julialang.org/t/horner-rule/7504/43 "2017-12-05T00:04:32Z")

</div>

This was really helpful. I’m not OP and I have read the metaprogramming section of the manual (multiple times), but I still don’t really understand macros intuitively, deep in my heart. That’s probably still true, but posts like this help chip away at the confusion. Thanks!

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [December 5, 2017, 2:20am UTC](https://discourse.julialang.org/t/horner-rule/7504/44 "2017-12-05T02:20:33Z")

</div>

I would recommend [On Lisp](http://ep.yimg.com/ty/cdn/paulgraham/onlisp.pdf) to anyone who really wants to learn macros, and is willing to put in some time and effort.

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [December 5, 2017, 2:39am UTC](https://discourse.julialang.org/t/horner-rule/7504/45 "2017-12-05T02:39:06Z")

</div>

I have an open issue for exactly that enhancement of the docs.

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [December 5, 2017, 2:42am UTC](https://discourse.julialang.org/t/horner-rule/7504/46 "2017-12-05T02:42:55Z")

</div>

Apologies for shameless self-promotion, but I produced some tutorial-type material on metaprogramming that may be useful:

- Video [here](https://www.youtube.com/watch?v=rAxzR7lMGDM); starts at 1:29:21.

- Notebooks [here](https://github.com/dpsanders/intermediate_julia).

Also check out my recent [blog post](https://julialang.org/blog/2017/08/dsl).

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [December 5, 2017, 2:43am UTC](https://discourse.julialang.org/t/horner-rule/7504/47 "2017-12-05T02:43:26Z")

</div>

Fantastic post!

[Previous page](https://discourse.julialang.org/t/horner-rule/7504.md?page=2)
