This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
title: 'mutator-object | |
author: "Christian Ensel" | |
usage: [ | |
>> do %../mutator-object.red | |
>> circle: mutator-object [ | |
#set area: does [if number? new [set-quiet in self 'radius square-root divide new pi]] | |
#get area: does [multiply pi power radius 2] | |
radius: 10 | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
author: "Christian Ensel" | |
needs: 'view | |
] | |
;-- requires the following patch for Red/View | |
; | |
patch: { | |
$ git diff --unified=1 | |
diff --git a/modules/view/backends/platform.red b/modules/view/backends/platform.red |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Author: ["Toomas Vooglaid" "Christian Ensel"] | |
Needs: 'View | |
] | |
#include %table-template.red | |
port?: func [value [any-type!]] [port! = type? :value] ;-- missing helper | |
context [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
title: "Conway's Game of Life" | |
author: "Gurzgri" | |
needs: 'view | |
] | |
life: leaf + 0.0.0.0 | |
dead: linen + 0.0.0.0 | |
init: func [size [pair!] density [percent!]] [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Title: "Go Fish" | |
Author: "Christian Ensel" | |
Date: 08-Feb-2022 | |
] | |
ranks: [2 3 4 5 6 7 8 9 10 J Q K A] | |
suits: [♠ ♣ ♥ ♦] | |
rank-of: func ["Returns rank of card" card] [trim/with copy card "♠♣♥♦"] |