# Function form of indexer?

**URL:** https://forums.fsharp.org/t/function-form-of-indexer/1160
**Category:** General
**Tags:** beginners
**Created:** [January 6, 2020, 11:22pm UTC](https://forums.fsharp.org/t/function-form-of-indexer/1160 "2020-01-06T23:22:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kroltan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/kroltan/32/695_2.png) [@kroltan](https://forums.fsharp.org/u/kroltan)
#### Post date: [January 6, 2020, 11:22pm UTC](https://forums.fsharp.org/t/function-form-of-indexer/1160/1 "2020-01-06T23:22:54Z")

</div>

Similar to how I can do

```auto
let add1 = (+) 1
let two = add1 1 // 2

```

Is it possible to do something like

```auto
let foo = [| 1; 2; 3 |]
let at = ([]) foo
let two = at 1 // 2

```

Possibly with different syntax, of course?

Just so I don’t have to write

```auto
let at i = foo.[i]

```

---

<div class="post-metadata">

### Author: ![FoggyFinder](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/foggyfinder/32/136_2.png) [@FoggyFinder](https://forums.fsharp.org/u/FoggyFinder)
#### Post date: [January 7, 2020, 7:08pm UTC](https://forums.fsharp.org/t/function-form-of-indexer/1160/2 "2020-01-07T19:08:25Z")

</div>

Module `Array` contains functions for this:  
`Array.get` or `Array.item` and safer version, that doesn’t throw `IndexOutOfRangeException`, `Array.tryItem`:

```auto
let foo = [| 1; 2; 3 |]
let at = Array.get foo
let two = at 1 // 2

```
