Skip to content

Commit

Permalink
testdata: add circle example
Browse files Browse the repository at this point in the history
Thanks to twitter's @p9luv for inspiration.
  • Loading branch information
robpike committed Feb 4, 2020
1 parent ebb3895 commit 5dae542
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions testdata/binary_vector.ivy
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,31 @@
**
***

# Example inspired by @p9luv.
op circle n = " *"[1+(y o.+ y=((-n+1)+iota (1+2*n))**2) <= n**2]
circle 10
*
*********
*************
***************
*****************
*****************
*******************
*******************
*******************
*******************
*********************
*******************
*******************
*******************
*******************
*****************
*****************
***************
*************
*********
*

# Encode (the names encode and decode seem backwards to me, but that's APL for ya.)
2 encode 3
1
Expand Down

0 comments on commit 5dae542

Please sign in to comment.