This file contains 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: "Nędza Darek" | |
date: 2019-11-09 | |
license: { | |
- no warranties | |
- use/modify everywhere | |
- just mention (this gist/github or something like this) | |
} | |
version: #0.0.1.preview2 | |
updates: { |
This file contains 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
rejoin*: func ["Reduces and joins a block of values." | |
block [block!] "Values to reduce and join" | |
][ | |
if empty? block: reduce block [return block] | |
append either (series? first block) [copy first block] [ | |
mold first block | |
] next block] | |
some_word: "foo:" | |
word: to-word "some_word" |
This file contains 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: {Nędza Darek} | |
license: { | |
- use/modify everywhere | |
- point to this gist/github | |
- no warranties | |
} | |
version: 0.0.1 | |
] | |
p1: to-path bind [next a] context [next: 11] |
This file contains 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: {Nędza Darek} | |
version: 0.0.2 | |
license: { | |
- point to this gist/github | |
- no warranties | |
- use/modify everywhere | |
} | |
] | |
float-incr: function [v] [ |
This file contains 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: "Nędza Darek" | |
license: "Just link to this gist" | |
] | |
gitter-source: https://gitter.im/red/help?at=5ce3990b9d64e537bce51706 | |
k-manual: https://github.com/JohnEarnest/ok/blob/gh-pages/docs/Manual.md | |
; The primitive verbs in K are either monadic (have only one argument - right, or x) or | |
; dyadic (have two arguments - left and right, or x and y). | |
; m is monadic, d is dyadic |
This file contains 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
each: function [a[block!] b [function!]] [ | |
collect [ | |
foreach el a [ | |
either block? el [ | |
keep/only each el :b | |
][ | |
keep b el | |
] | |
] | |
] |
This file contains 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
[datatype! ": "] | |
error | |
[unset! ": "] | |
error | |
[none! ": "] | |
error | |
[logic ": "] | |
error | |
[char ": "] | |
error |
This file contains 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
||=: make op! func ['a b] [either value? a [return get a] [set a b return b]] | |
a: 4 | |
a ||= 3 | |
; == 4 | |
c ;*** Script Error: c has no value | |
c ||= 42 | |
; == 42 | |
c | |
; == 42 |
This file contains 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
system/view/auto-sync?: no | |
canvas-size: 900x900 | |
ball-speed: 1x1 | |
ball-size: 10 | |
ball-spacing: 36x1 | |
balls-number: 1000 | |
balls: make block! 1500 | |
balls2: make block! 1500 | |
draw-block: [] | |
ball-color: does [as-color random 255 210 222] |
This file contains 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[] | |
l: layout[ | |
do [ | |
number-of-colors: 0 | |
select-data: function [ | |
list | |
] [ | |
select list/data to-string list/selected | |
] | |
] |
NewerOlder