Skip to content

Commit 0adadb8

Browse files
author
Alfonso Ruzafa
committed
add removed
1 parent f3b2011 commit 0adadb8

File tree

7 files changed

+93
-0
lines changed

7 files changed

+93
-0
lines changed

assets/images/functions/_style.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,12 @@
441441
\draw [brace flow=#1] #2 -- #3;
442442
\ifdim #1pt<0pt
443443
\coordinate (lastbrace) at ($ #2!.5!#3 + (0, -.2) + (0, #1) $);
444+
\coordinate (lastbrace_v) at ($ #3!.5!#2 + (-.2, 0) + (#1, 0) $);
444445
\else
445446
\coordinate (lastbrace) at ($ #2!.5!#3 + (0, .2) + (0, #1) $);
447+
\coordinate (lastbrace_v) at ($ #2!.5!#3 + (.2, 0) + (#1, 0) $);
446448
\fi
449+
\coordinate (lastbrace_h) at (lastbrace);
447450
}
448451

449452
\tikzset{measure width/.style={
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
\matrix (A) [collection] {
2+
\node (k1) {$k_1$}; \\
3+
\node [vertical elements between]; \\
4+
\node (ki-1) {$k_{i - 1}$}; \\
5+
\node (ki) {$k_i\!\!=\!\!\texttt{k}$}; \\
6+
\node (ki+1) {$k_{i + 1}$}; \\
7+
\node [vertical elements between]; \\
8+
\node (kn) {$k_n$}; \\
9+
};
10+
11+
\foreach \i in {1,i-1,i,i+1,n}{
12+
\draw [map ->] (k\i.east) -- +(.5, 0)
13+
node [element, right] {$v_{\i}$};
14+
}
15+
16+
\matrix (B) [collection, right=4 of A.east, anchor=center] {
17+
\node (l1) {$k_1$}; \\
18+
\node [vertical elements between]; \\
19+
\node (li-1) {$k_{i - 1}$}; \\
20+
\node (li+1) {$k_{i + 1}$}; \\
21+
\node [vertical elements between]; \\
22+
\node (ln) {$k_n$}; \\
23+
};
24+
25+
\foreach \i in {1,i-1,i+1,n}{
26+
\draw [map ->] (l\i.east) -- +(.5, 0)
27+
node [element, right] {$v_{\i}$};
28+
}
29+
30+
\braceflow[1.2]{(k1.north east)}{(ki-1.south east)}
31+
\coordinate (x) at (lastbrace_v);
32+
\braceflow[-.2]{(l1.north west)}{($ (li-1.south west) + (0, \pgflinewidth) $)}
33+
\draw [flow ->, out=0, in=180] (x) to (lastbrace_v);
34+
35+
\braceflow[1.2]{(ki+1.north east)}{(kn.south east)}
36+
\coordinate (x) at (lastbrace_v);
37+
\braceflow[-.2]{($ (li+1.north west) + (0, -\pgflinewidth) $)}{(ln.south west)}
38+
\draw [flow ->, out=0, in=180] (x) to (lastbrace_v);

content/en/functions/removed.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: removed
3+
---
4+
5+
# `removed`
6+
7+
{{< signature removed >}}
8+
9+
`removed` creates a new `Map` by copying all the elements from this one but omitting the element with key `k`.
10+
11+
{{< figure src="images/functions/removed.svg" >}}

content/es/functions/removed.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: removed
3+
---
4+
5+
# `removed`
6+
7+
{{< signature removed >}}
8+
9+
`removed` crea un nuevo `Map` copiando todos los elementos de este pero omitiendo el elemento con clave `k`.
10+
11+
{{< figure src="images/functions/removed.svg" >}}

content/ja/functions/removed.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: removed
3+
untranslated: true
4+
---
5+
6+
# `removed`
7+
8+
{{< signature removed >}}
9+
10+
`removed` creates a new `Map` by copying all the elements from this one but omitting the element with key `k`.
11+
12+
{{< figure src="images/functions/removed.svg" >}}

content/pt/functions/removed.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: removed
3+
untranslated: true
4+
---
5+
6+
# `removed`
7+
8+
{{< signature removed >}}
9+
10+
`removed` creates a new `Map` by copying all the elements from this one but omitting the element with key `k`.
11+
12+
{{< figure src="images/functions/removed.svg" >}}

data/functions.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,12 @@
613613
def reduceRightOption[B :> A](f: (A, B) => B): Option[B]
614614
}
615615
616+
- name: removed
617+
signature: |
618+
trait Map[K, V] {
619+
def removed(k: K): Map[K, V]
620+
}
621+
616622
- name: reverse
617623
signature: |
618624
trait Collection[A] {

0 commit comments

Comments
 (0)