Skip to content

Commit 738cfea

Browse files
committed
fix self vs select
1 parent 5c800af commit 738cfea

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

site/primitives.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@
405405
"description": "Encode audio into a byte array"
406406
},
407407
"backward": {
408-
"glyph": "𝄈",
408+
"glyph": "˜",
409409
"outputs": 1,
410410
"modifier_args": 1,
411411
"class": "Stack",
@@ -1179,6 +1179,14 @@
11791179
"class": "DyadicArray",
11801180
"description": "Select multiple rows from an array"
11811181
},
1182+
"self": {
1183+
"glyph": "˙",
1184+
"outputs": 1,
1185+
"modifier_args": 1,
1186+
"class": "Stack",
1187+
"description": "Call a function with the same array as all arguments",
1188+
"experimental": true
1189+
},
11821190
"send": {
11831191
"args": 2,
11841192
"outputs": 0,

src/primitive/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ static ALIASES: Lazy<HashMap<Primitive, &[&str]>> = Lazy::new(|| {
408408
(Primitive::First, &["fst"]),
409409
(Primitive::Last, &["lst"]),
410410
(Primitive::Slf, &["slf"]),
411+
(Primitive::Select, &["sel"]),
411412
(Primitive::ImageEncode, &["&ime", "imen"]),
412413
(Primitive::GifEncode, &["&gife", "gifen"]),
413414
(Primitive::AudioEncode, &["&ae", "auden"]),
@@ -2539,7 +2540,10 @@ mod tests {
25392540
assert_eq!(test(&short), Some(prim));
25402541
}
25412542
for prim in Primitive::non_deprecated() {
2542-
if matches!(prim, Primitive::Rand | Primitive::Trace | Primitive::Parse) {
2543+
if matches!(
2544+
prim,
2545+
Primitive::Rand | Primitive::Trace | Primitive::Parse | Primitive::Slf
2546+
) {
25432547
continue;
25442548
}
25452549
let char_test = match prim.glyph() {

0 commit comments

Comments
 (0)