squiggle/packages/website/docs/Api/Dictionary.md

58 lines
533 B
Markdown
Raw Normal View History

2022-06-05 20:59:45 +00:00
---
2022-06-06 03:02:17 +00:00
sidebar_position: 1
title: Dictionary
2022-06-05 20:59:45 +00:00
---
### toString
2022-06-06 05:16:29 +00:00
```
toString: (dict<'a>) => string
2022-06-05 20:59:45 +00:00
```
2022-06-06 05:16:29 +00:00
### get
```
Dict.get: (dict<'a>, string) => a
2022-06-05 20:59:45 +00:00
```
2022-06-06 05:16:29 +00:00
### set
```
Dict.set: (dict<'a>, string, a) => a
2022-06-05 20:59:45 +00:00
```
2022-06-06 05:16:29 +00:00
### toPairs
```
Dict.toPairs: (dict<'a>) => list<list<string|a>>
2022-06-05 20:59:45 +00:00
```
2022-06-06 05:16:29 +00:00
### keys
```
Dict.keys: (dict<'a>) => list<string>
2022-06-05 20:59:45 +00:00
```
2022-06-06 05:16:29 +00:00
### values
```
Dict.values: (dict<'a>) => list<'a>
2022-06-05 20:59:45 +00:00
```
2022-06-06 05:16:29 +00:00
### merge
```
Dict.merge: (dict<'a>, dict<'b>) => dict<'a|b>
2022-06-05 20:59:45 +00:00
```
2022-06-06 05:16:29 +00:00
### mergeMany
2022-06-05 20:59:45 +00:00
```
2022-06-06 05:16:29 +00:00
Dict.mergeMany: (list<dict<'a>>) => dict<'a>
```