I will note that, with my proposed n:, this would be trivial: (0&, + ,&0)^:(2&^ n:)@1
You can hack a direct translation with a right argument: ] (0&, + ,&0)@]^:(2^[) 1: On Sat, 12 Aug 2023, 'Nollaig MacKenzie' via Chat wrote:
numtt=: 3 : '((,~ 0:) + (, 0:)) ^: (2^y) 1’ calculates, for the possible truth-tables of y variables a list of the those which have 0 1s, 1 1, 2 1s ….. e.g. numtt 2 1 4 6 4 1 numtt just produces the appropriate row of Pascal’s Triangle. It’s a trivial little verb, but I’m bothered by the fact that I can’t see a way to make it tacit. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
