arliss_obsidian/fp/Language/Functions/Applying.md

60 lines
746 B
Markdown
Raw Normal View History

2024-09-23 23:56:55 +00:00
When 2 or more expressions are separated by whitespace, the left-most expression is a [[Functions|function]] and the others are arguments to it.
`````col
````col-md
#### Purescript
```haskell
Number.pow 2.0 10.0
```
````
````col-md
#### JS Equivalent
```javascript
Math.pow(2.0, 10.0)
```
````
`````
`````col
````col-md
```haskell
toString a
```
````
````col-md
```javascript
a.toString()
```
````
`````
`````col
````col-md
```haskell
intercalate ", " ["a", "b", "c"]
```
````
````col-md
```javascript
["a", "b", "c"].join(", ")
```
````
`````
`````col
````col-md
```haskell
intercalate
", "
["a", "b", "c"]
```
````
````col-md
```javascript
["a", "b", "c"]
.join(", ")
```
````
`````
![[Infix Operators#Infix Position|infix position]]