# Syntax spec? (Let vs where)

**URL:** <https://discourse.ats-lang.org/t/syntax-spec-let-vs-where/680>\
**Category:** Google Group\
**Created:** [May 6, 2016, 7:26pm UTC](https://discourse.ats-lang.org/t/syntax-spec-let-vs-where/680 "2016-05-06T19:26:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raoul\_Duke](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Raoul\_Duke](https://discourse.ats-lang.org/u/Raoul_Duke)\
**Post date:** [May 6, 2016, 7:26pm UTC](https://discourse.ats-lang.org/t/syntax-spec-let-vs-where/680/1 "2016-05-06T19:26:41Z")

</div>

Hi, I looked a bit but failed to find a language syntax spec, to help  
advertise / answer questions about ATS features & syntax. Please consider  
making it more findable? 🙂

I see let-in but is there support for where (which I overall much prefer)?

Thank you.

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [May 6, 2016, 8:42pm UTC](https://discourse.ats-lang.org/t/syntax-spec-let-vs-where/680/2 "2016-05-06T20:42:47Z")

</div>

It is buried pretty deep:

> **[Home Page for ATS-resource](https://ats-lang.sourceforge.net/htdocs-old/RESOURCE/resource.html)**
>
> Home Page for ATS-resource

[http://ats-lang.sourceforge.net/htdocs-old/DOCUMENT/GRAMMAR/ats\_grammar\_desc.html](http://ats-lang.sourceforge.net/htdocs-old/DOCUMENT/GRAMMAR/ats_grammar_desc.html)

Here is an example:

fun fact(n: int): int = fact2(n, 1) where  
{  
//  
fun fact2(n: int, res:int): int = if n \> 0 then fact2(n-1, n\*res) else res  
//  
}On Friday, May 6, 2016 at 3:26:43 PM UTC-4, Raoul Duke wrote:

> Hi, I looked a bit but failed to find a language syntax spec, to help  
> advertise / answer questions about ATS features & syntax. Please consider  
> making it more findable? 🙂
> 
> I see let-in but is there support for where (which I overall much prefer)?
> 
> Thank you.

---

<div class="post-metadata">

**Author:** ![Raoul\_Duke](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Raoul\_Duke](https://discourse.ats-lang.org/u/Raoul_Duke)\
**Post date:** [May 6, 2016, 8:43pm UTC](https://discourse.ats-lang.org/t/syntax-spec-let-vs-where/680/3 "2016-05-06T20:43:54Z")

</div>

thanks!
