Quick install guide for Arch -- if you're looking for an automated installer, consider Arch Anywhere.
Download the latest version from: https://www.archlinux.org/download/
| def permutations(nums: Seq[Int]): Seq[Seq[Int]] = { | |
| if (nums.isEmpty) | |
| Array(Seq()) | |
| else { | |
| for ( | |
| n <- nums; | |
| perms <- permutations(nums.filter(_ != n)) | |
| ) yield n +: perms | |
| } | |
| } |
Quick install guide for Arch -- if you're looking for an automated installer, consider Arch Anywhere.
Download the latest version from: https://www.archlinux.org/download/
| trait Pok { | |
| def rank: Int | |
| def isScalar: Boolean | |
| def isVector: Boolean | |
| def isFn: Boolean | |
| def typeString: String |
| LinSearch ← { ⍸⍺=⍵ } | |
| a ← 23 46 ¯9 5 67 0 10 | |
| ¯9 LinSearch a ⍝ 3 | |
| b ← 4 5 ¯3 23 ¯3 45 0 1 | |
| ¯3 LinSearch b ⍝ 3 5 |
| 10 HOME | |
| 12 PRINT "Guess a number from 1 to 100" | |
| 14 PRINT "I WILL TRY TO GUESS NOW..." | |
| 16 L=0:H=101 | |
| 18 M=INT((L+H)/2) | |
| 20 PRINT "IS IT ";M;"?" | |
| 22 PRINT "IF YES, ENTER 0." | |
| 24 PRINT "IF IT IS MORE THAN GUESS, ENTER 1" | |
| 26 PRINT "IF IT IS LESS THAN GUESS, ENTER 2" | |
| 28 INPUT C |
| ;;; Lisp - top 2 in a list | |
| (defun top-2 (a) | |
| (let ((ls (reduce | |
| #'(lambda (vs n) | |
| (if (null (third vs)) | |
| (list | |
| n | |
| (second vs) | |
| n) |
| SortByParity ← (((¬2⊸|)/⊢)∾(2⊸|/⊢)) | |
| SortByParity 1‿2‿3‿4 |
| const B = (x, y) => z => x(y(z)) |
| // Combinators | |
| const I = x => x | |
| const K = (x, y) => x | |
| const S = (b, u) => x => b(u(x), x) | |
| const Sp = (b, u, v) => x => b(u(x), v(x)) | |
| const B = (u, v) => (x) => u(v(x)) | |
| const C = (b, u, v) => (x, y) => b(u(x, y), v(y)) | |
| // Helpers | |
| const eq = (x, y) => x === y |
| program cat(input, output); | |
| var | |
| fname: string[60]; | |
| f: text; | |
| ln: string[100]; | |
| rw: integer; | |
| i: integer; | |
| begin | |
| write('FILE? '); | |
| readln(fname); |