csi> (Shape 5 2) #(2 2 2 2 2)
|
»Home
»r4c
»Misc
|
Redick for C ProgrammersTable of Contents
A shameless plagiarism of the best book for learning J: "J for C Programmers" by Henry Rich. 1. IntroductionJ programs are usually a fifth to a tenth as long as corresponding C programs, and along with that economy of expression comes coding speed. C is a computer language; it lets you control the things the computer does. J is a language of computation: it lets you describe what needs to be done without getting bogged down in details. J will take advantage of your skill in grasping the essence of a problem. J contains a couple of dozen array-processing primitives and a dozen or so very cleverly chosen pipe-fittings that allow those primitives to be connected together to provide the limitless supply of array-processing functions needed for practical programming. 2. Culture Shock3. Declarations3.1. Arrays
3.2. CellsThe best essay for describing the relation betweens cells and rank, "A Fine Line" was written by Dan Bron.
3.3. Array-creating Verbs (and their interrogators)3.3.1. Shape and ShapeOfExample: Create a datum with shape (rank-1 5)
csi> (Shape 5 2) #(2 2 2 2 2) Example: Create another datum with shape (rank-1 5)
csi> (Shape 5 (rank-1 "ab")) #(#\a #\b #\a #\b #\a csi> (array->string (Shape 5 (rank-1 "ab"))) "ababa"
|