Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. |= n=@ :: create gate core with single arm n
  2. =< (goldbach n) :: evaluates its first child expression with respect to its second child expression as the subject
  3. |% :: Produce a core, [battery payload]
  4. ++ prime :: arm prime
  5. |= n=@ :: create gate core with single arm n
  6. ^- ? :: typecast
  7. ?: (lth n 2) | :: if n is not less than 2
  8. ?: (lth n 4) & :: if n is less than 4
  9. =/ i=@ 2 :: combine named noun i value 2 with the subject
  10. =/ j=@ 2 :: combine named noun j value 2 with the subject
  11. |- ^- ?
  12. ?: =((mul i j) n) |
  13. ?: =(j (div n 2)) &
  14. ?: (gth (mul i j) n)
  15. $(i 2, j +(j))
  16. $(i +(i))
  17. ++ goldbach :: arm goldbach
  18. |= n=@ :: create gate core with single arm n
  19. ^- ?(? [[@ @] ?]) :: typecast
  20. ?: |((lth n 4) =((mod n 2) 1)) | :: if n is less than 2, n is odd
  21. =/ i=@ 2 :: combine named noun i value 2 with the subject
  22. =/ j=@ (sub n 2) :: combine named noun j value n-2 with the subject
  23. |- ^- ?(? [[@ @] ?])
  24. ?: &((prime i) (prime j)) [[i j] |]
  25. ?: =((add 2 i) n) &
  26. $(i +(i), j (dec j))
  27. -- :: terminate expression
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement