add reverse example

pull/21/head
Ondřej Hruška 4 years ago
parent ee59096821
commit 9aee9ca143
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 9
      examples/stdio_rev.csn

@ -0,0 +1,9 @@
(
(mkbf r7)
(:r)(ld r0 @stdin)
(cmp r0 '\n' (eq? (j :q)))
(bfpush @r7 r0)
(j :r)
(:q)(bfpop @stdout @r7 (nem? (j :q)))
(ld @stdout '\n')
)
Loading…
Cancel
Save