# Extending methods of pure function

**URL:** https://discourse.julialang.org/t/extending-methods-of-pure-function/18852
**Category:** General Usage
**Created:** [December 20, 2018, 2:33pm UTC](https://discourse.julialang.org/t/extending-methods-of-pure-function/18852 "2018-12-20T14:33:22Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)
#### Post date: [December 20, 2018, 11:35pm UTC](https://discourse.julialang.org/t/extending-methods-of-pure-function/18852/8 "2018-12-20T23:35:29Z")

</div>

But then I found this example where a `@pure` function calls a generic function which includes a path to `throw` but actually is impossible to `throw` inside the context of the `@pure` function: [Rationale for the `@pure`ity of `Rational{T}(x)`](https://discourse.julialang.org/t/rationale-for-the-pure-ity-of-rational-t-x/18872). So maybe it’s fine to do this?

```julia
Base.@pure mysin_pure(x::Float64) = isfinite(x) ? sin(x) : NaN

```

---

_[View the full topic](https://discourse.julialang.org/t/extending-methods-of-pure-function/18852)._
