User:RE Boss/Performance Records/Power Set
Jump to navigation
Jump to search
Verbs are taken from Power Set where also more information on this subject is to be found.
Collected Definitions
ps0 =: #:@i.@(2&^)@# <@#"1 _ ] ps1a=: 3 : 'if. 0=#y do. ,<0#y else. (<{.y) (],,&.>) ps1a }.y end.' ps1b=: ,@<@(0&#) ` (<@{. (],,&.>) $:@}.) @. (0<#) ps2 =: , @ ((],,&.>)/) @ (<"_1 , <@(0&#)) ps3 =: (i.@>:@# comb&.> #) {&.> <@] ps4=: 3 : '(}:,;&.>@{:) (}:, [:({.,<@(i.@#,.&.>])@}.)[:,&.>/\.>@{:)^:y(y$<i.0 0)<@,<i.1 0' ps4a=: ([:ps4 #) {&.> < NB. for nouns which are not an integer atom. comb=: 4 : 0 NB. All size x combinations of i.y k=. i.>:d=.y-x z=. (d$<i.0 0),<i.1 0 for. i.x do. z=. k ,.&.> ,&.>/\. >:&.> z end. ; z )
Relative performance on i.20