Skip to content

Commit 1656213

Browse files
committed
added Kernel.then/2
1 parent ef9c4f9 commit 1656213

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
\node (fun) [fun];
2+
\draw [<-] (fun.in) -- +(0, 1) node [above] {$a$};
3+
\draw [->] (fun.out) -- +(0, -1) node [below] {$b$};
4+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: then/2
3+
url: Kernel/then/2
4+
---
5+
6+
Pipes the first argument, `value`, into the function `fun`, and returns its result.
7+
8+
This is most commonly used in pipelines, using the `|>/2` operator, allowing you to pipe a value to a function outside of its first argument.
9+
10+
{{< figure src="images/functions/Kernel/then-2.svg" >}}
11+

data/signatures.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,11 @@
623623
defmodule Kernel do
624624
def tap(value, fun)
625625
end
626+
- name: then/2
627+
signature: |
628+
defmodule Kernel do
629+
def then(value, fun)
630+
end
626631
627632
- name: Keyword
628633
functions:

0 commit comments

Comments
 (0)