# Just Another Example of the Array Language

**URL:** <https://racket.discourse.group/t/just-another-example-of-the-array-language/4201>\
**Category:** Show & Tell\
**Created:** [May 10, 2026, 4:47am UTC](https://racket.discourse.group/t/just-another-example-of-the-array-language/4201 "2026-05-10T04:47:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ulambda](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/ulambda/32/1495_2.png) [@ulambda](https://racket.discourse.group/u/ulambda)\
**Post date:** [May 10, 2026, 4:47am UTC](https://racket.discourse.group/t/just-another-example-of-the-array-language/4201/1 "2026-05-10T04:47:17Z")

</div>

This is the continuation of

> [@An Array Language](https://racket.discourse.group/t/an-array-language/3980):
>
> [miscellaneous/array0.rkt at main · alpha-beta-eta/miscellaneous](https://github.com/alpha-beta-eta/miscellaneous/blob/main/array0.rkt) Basically, I follow the idea in the link below: [Image Processing Playground with Array Languages](https://okmij.org/ftp/image/ArrayL/) (faithfully) translate the OCaml code into Racket and make a few modications of the original code. An Example: (emitPPM cmap1 (\<\< (array '(2 2) (const 4)) ((repeated 8) (expander scale-twice 1.3))) "0.ppm") I hope you can have fun with it.

Note that I modify the array language a little bit.

> **[GitHub - alpha-beta-eta/Game-of-Life](https://github.com/alpha-beta-eta/Game-of-Life)**
>
> Contribute to alpha-beta-eta/Game-of-Life development by creating an account on GitHub.

```scheme
(define conway-kernel
  (<< (Array #(1 1 1 1 0 1 1 1 1))
      (rho2 3 3)))
(define (neighbor grid)
  (<< conway-kernel
      (Convolve2 grid '(1 1))))
(define (step grid)
  (Materialize2
   ((Zip-with
     (λ (x n)
       (if (= x 1)
           (if (or (= n 2) (= n 3)) 1 0)
           (if (= n 3) 1 0))))
    grid (neighbor grid))))

```

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [May 10, 2026, 7:48pm UTC](https://racket.discourse.group/t/just-another-example-of-the-array-language/4201/2 "2026-05-10T19:48:39Z")

</div>

This is cool. 👏

I remember watching a video of game of life being live coded in APL.  
Fortunately this is a little more readable than the ultra-terse APL version.
