From f155aa59801dd87586f4792a828b4438852dc021 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 27 Apr 2022 22:47:18 -0400 Subject: Add an Under diagram to variables tutorial --- tutorial/variable.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'tutorial') diff --git a/tutorial/variable.md b/tutorial/variable.md index 6799cd6d..c9deba12 100644 --- a/tutorial/variable.md +++ b/tutorial/variable.md @@ -112,6 +112,41 @@ Primitives ⟨ "⌾%K%Under", "⊑%I%First%Pick" ⟩ --> Besides using some primitives we haven't seen here, the notation is a little noisy. In return it's very flexible, in that you can apply any function you want, at a location you can select with a large class of BQN functions. + + So let's break this down. The 2-modifier Under (`⌾`) has two operands: the left one, `-⟜1`, subtracts one, and the right one, `2⊸⊑` uses a function we haven't seen before. It uses the right operand to pick out part of its argument, then the left one acts on that part only, and the entire argument, with the necessary modifications, is returned.