Toggle menu
15
236
75
27.7K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Array/testcases: Revision history

From Kenshi Wiki

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

10 March 2025

  • curprev 22:3322:33, 10 March 2025 Prd talk contribs 2,353 bytes +2,353 Created page with "local export = {} local Array = require "Module:array" local function collect(iter) local vals = Array() for val in iter do vals:insert(val) end return vals end local total_tests, successes = 0, 0 local function assert(val) total_tests = total_tests + 1 if val then successes = successes + 1 end end function export.run_tests() local ok, ret = pcall(function () assert(Array(1, 2, 3):map(function (x) return x * x end):concat ", " == "1, 4, 9") assert(..."