Under
Jump to navigation
Jump to search
⍢
|
Under (⍢
) is a primitive dyadic operator which takes two function operands. It pre-processes it's argument(s) with the monadic right operand, before applying the left operand on/between the result(s), then undoing the pre-processing.[1]
Model
In dialects that support user-defined operators and invertible functions, it can be defined as (or similar):
_U_ ← {⍺←{⍵ ⋄ ⍺⍺} ⋄ ⍵⍵⍣¯1⊢(⍵⍵ ⍺)⍺⍺(⍵⍵ ⍵)}
Examples
⍝ https://leetcode.com/problems/add-two-numbers/ 2 4 3 +_U_(10⊥⌽) 5 6 4 7 0 8