From 62e14d343cc6e1122a0f2c6970b89e85a2aa8af2 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 29 Apr 2022 23:13:43 -0400 Subject: =?UTF-8?q?Allow=20formatter=20=F0=9D=95=A8=20for=20maximum=20outp?= =?UTF-8?q?ut=20size,=20truncating=20with=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/f.bqn | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/f.bqn b/src/f.bqn index ebfb5c5e..859c5fff 100644 --- a/src/f.bqn +++ b/src/f.bqn @@ -95,6 +95,14 @@ # Format any value to character matrix Fmt ← Type (3≤⊣)◶⟨FmtDat⊢,FmtOp⟩ ⊢ + Trunc ← { + m ← "•Fmt: 𝕨 must be a list of up to two numbers (width, height)" + m ! (1≥=)◶⟨0,2≥≠⟩ 𝕨 + sh ← ⌽𝕨»∞‿∞ + c ← sh