archive-org.com » ORG » I » IOKE.ORG

Total: 746

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Kind: DefaultBehavior
    assigns this result to the name s provided by the first arguments the first arguments remains unevaluated the result of the assignment is the value assigned to the name if the last argument is a method like object and it s name is not set that name will be set to the name of the cell other returns true if the left hand side is equal to the right hand side exactly what this means depend on the object the default behavior of Ioke objects is to only be equal if they are the same instance cell cellName expects one evaluated text or symbol argument and returns the cell that matches that name without activating even if it s activatable cell cellName value expects one evaluated text or symbol argument that names the cell to set sets this cell to the result of evaluating the second argument and returns the value set cell cellName expects one evaluated text or symbol argument and returns a boolean indicating whether such a cell is reachable from this point cellNames includeMimics false cutoff nil takes one optional evaluated boolean argument which defaults to false if false this method returns a list of the cell

    Original URL path: https://ioke.org/dok/latest/kinds/Mixins.html (2016-02-13)
    Open archived version from archive


  • Kind: DefaultBehavior
    return true if the receiver is less than or equal to the argument otherwise false show source method other result other result result 1 other should be overridden will result in an inconsistent ordering by always returning 1 except when comparing to itself and then it will return 0 show source method other if cell other kind Mixins Comparing 0 0 1 other return true if the receiver is equal

    Original URL path: https://ioke.org/dok/latest/kinds/Mixins/Comparing.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    call ground cell n if collecting result cell n unless cell x collecting true result cell n result argCount 2 argName call arguments 0 theCode call arguments 1 result set collecting false destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if collecting result cell n unless cell x collecting true result cell n result error Condition Error Invocation NoMatch message call message context call currentContext eachCons takes one two or three arguments if one argument assumes this to be a message chain and the cons length to be two if two arguments expects the first to be the cons length and the second to be the message chain if three expects the first to be the cons length the second to be a variable name and the third to be a message chain will yield lists of length consLength counting from the beginning of the enumerable show source macro argCount call arguments length cond argCount 1 code call arguments 0 consLength 2 ary list self each n if ary length consLength ary shift ary push n if ary length consLength code evaluateOn call ground ary mimic self argCount 2 consLength call argAt 0 code call arguments 1 ary list self each n if ary length consLength ary shift ary push n if ary length consLength code evaluateOn call ground ary mimic self argCount 3 consLength call argAt 0 argName call arguments 1 code call arguments 2 destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list code call ground ary list self each n if ary length consLength ary shift ary push n if ary length consLength lexicalCode call destructor unpack ary mimic self error Condition Error Invocation NoMatch message call message context call currentContext eachSlice takes one two or three arguments if one argument assumes this to be a message chain and the slice length to be two if two arguments expects the first to be the slice length and the second to be the message chain if three expects the first to be the slice length the second to be a variable name and the third to be a message chain will yield lists of length sliceLength counting from the beginning of the enumerable show source macro argCount call arguments length cond argCount 1 code call arguments 0 sliceLength 2 ary list self each n ary push n if ary length sliceLength code evaluateOn call ground ary ary list if ary length 0 code evaluateOn call ground ary self argCount 2 sliceLength call argAt 0 code call arguments 1 ary list self each n ary push n if ary length sliceLength code evaluateOn call ground ary ary list if ary length 0 code evaluateOn call ground ary self argCount 3 sliceLength call argAt 0 argName call arguments 1 code call arguments 2 destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list code call ground ary list self each n ary push n if ary length sliceLength lexicalCode call destructor unpack ary ary list if ary length 0 lexicalCode call destructor unpack ary self error Condition Error Invocation NoMatch message call message context call currentContext filter nil show source macro argCount call arguments length cond argCount 0 result list self each n x cell n if cell x result cell n result argCount 1 theCode call arguments 0 result list self each n x theCode evaluateOn call ground cell n if cell x result cell n result argCount 2 argName call arguments 0 theCode call arguments 1 result list destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x result cell n result error Condition Error Invocation NoMatch message call message context call currentContext filter dict nil show source macro argCount call arguments length cond argCount 0 result dict self each n x cell n if cell x if cell n mimics Pair result n key n value result cell n nil result argCount 1 theCode call arguments 0 result dict self each n x theCode evaluateOn call ground cell n if cell x if cell n mimics Pair result n key n value result cell n nil result argCount 2 argName call arguments 0 theCode call arguments 1 result dict destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x if cell n mimics Pair result n key n value result cell n nil result error Condition Error Invocation NoMatch message call message context call currentContext filter set nil show source macro argCount call arguments length cond argCount 0 result set self each n x cell n if cell x result cell n result argCount 1 theCode call arguments 0 result set self each n x theCode evaluateOn call ground cell n if cell x result cell n result argCount 2 argName call arguments 0 theCode call arguments 1 result set destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x result cell n result error Condition Error Invocation NoMatch message call message context call currentContext find takes zero one or two arguments if zero arguments returns the first element that is true otherwise nil if one argument expects it to be a message chain if that message chain when applied to the current element returns a true value the corresponding element is returned finally if two arguments are given the first argument is an unevaluated name and the second is a code element these will together be turned into a lexical block and tested against the values in this element if it returns true for any element the element will be retuend otherwise nil show source macro argCount call arguments length if argCount 0 self each n x cell n if cell x return cell n nil if argCount 1 theCode call arguments 0 self each n x theCode evaluateOn call ground cell n if cell x return cell n nil if argCount 2 argName call arguments 0 theCode call arguments 1 destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x return cell n nil error Condition Error Invocation NoMatch message call message context call currentContext findAll nil show source macro argCount call arguments length cond argCount 0 result list self each n x cell n if cell x result cell n result argCount 1 theCode call arguments 0 result list self each n x theCode evaluateOn call ground cell n if cell x result cell n result argCount 2 argName call arguments 0 theCode call arguments 1 result list destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x result cell n result error Condition Error Invocation NoMatch message call message context call currentContext findAll dict nil show source macro argCount call arguments length cond argCount 0 result dict self each n x cell n if cell x if cell n mimics Pair result n key n value result cell n nil result argCount 1 theCode call arguments 0 result dict self each n x theCode evaluateOn call ground cell n if cell x if cell n mimics Pair result n key n value result cell n nil result argCount 2 argName call arguments 0 theCode call arguments 1 result dict destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x if cell n mimics Pair result n key n value result cell n nil result error Condition Error Invocation NoMatch message call message context call currentContext findAll set nil show source macro argCount call arguments length cond argCount 0 result set self each n x cell n if cell x result cell n result argCount 1 theCode call arguments 0 result set self each n x theCode evaluateOn call ground cell n if cell x result cell n result argCount 2 argName call arguments 0 theCode call arguments 1 result set destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x result cell n result error Condition Error Invocation NoMatch message call message context call currentContext findIndex takes zero one or two arguments if zero arguments returns the index of the first element that is true otherwise nil if one argument expects it to be a message chain if that message chain when applied to the current element returns a true value the corresponding element index is returned finally if two arguments are given the first argument is an unevaluated name and the second is a code element these will together be turned into a lexical block and tested against the values in this element if it returns true for any element the element index will be returned otherwise nil show source macro argCount call arguments length if argCount 0 self each ix n if cell n return ix nil if argCount 1 theCode call arguments 0 self each ix n if theCode evaluateOn call ground cell n return ix nil if argCount 2 argName call arguments 0 theCode call arguments 1 destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each ix n if lexicalCode call destructor unpack cell n return ix nil error Condition Error Invocation NoMatch message call message context call currentContext first howMany nil takes one optional argument if no argument is given first will return the first element in the collection or nil if no such element exists if an argument is given it should be a number describing how many elements to get the return value will be a list in that case show source method howMany nil if howMany result list self each n if howMany 0 return result howMany result cell n return result self each n return cell n return nil first dict howMany takes one argument the argument should be a number describing how many elements to get the return value will be a dict show source method howMany result dict self each n if howMany 0 return result howMany if cell n mimics Pair result n key n value result cell n nil return result first set howMany takes one argument the argument should be a number describing how many elements to get the return value will be a set show source method howMany result set self each n if howMany 0 return result howMany result cell n return result flatMap expects to get the same kind of arguments as map and that each map operation returns a list these lists will then be folded into a single list show source macro call resendToMethod map fold flatMap dict expects to get the same kind of arguments as map dict and that each map operation returns a dict for key these dicts will then be folded into a single dict show source macro call resendToMethod map dict fold sum arg arg key each val sum val key val value sum flatMap list nil show source macro call resendToMethod map fold flatMap set expects to get the same kind of arguments as map set and that each map operation returns a set these sets will then be folded into a single set show source macro call resendToMethod map set fold fold nil show source macro argCount call arguments length if argCount 1 theCode call arguments 0 theCode theCode deepCopy elementName genSym theCode last message elementName sum nil self each i n if i 0 sum cell n call ground cell elementName cell n sum theCode evaluateOn call ground cell sum return cell sum if argCount 2 argName call arguments 0 theCode call arguments 1 elementName argName name sum nil self each i n if i 0 sum cell n call ground cell elementName cell n sum theCode evaluateOn call ground cell sum return cell sum if argCount 3 sumArgName call arguments 0 argName call arguments 1 theCode call arguments 2 destructor Destructor from argName lexicalCode LexicalBlock createFrom list sumArgName destructor argNames list theCode call ground sum nil self each i n if i 0 sum cell n sum lexicalCode call cell sum destructor unpack cell n return cell sum if argCount 4 sum call argAt 0 sumArgName call arguments 1 argName call arguments 2 theCode call arguments 3 destructor Destructor from argName lexicalCode LexicalBlock createFrom list sumArgName destructor argNames list theCode call ground self each n sum lexicalCode call cell sum destructor unpack cell n return cell sum error Condition Error Invocation NoMatch message call message context call currentContext grep takes one two or three arguments grep will first find any elements in the collection matching the first argument with if two or three arguments are given these will be used to transform the matching object and then add the transformed version instead of the original element to the result list the two argument version expects the second argument to be a message chain and the three argument version expects it to be something that can be turned into a lexical block show source macro argCount call arguments length cond argCount 1 matchingAgainst call argAt 0 result list self each n if matchingAgainst cell n result cell n result argCount 2 matchingAgainst call argAt 0 theCode call arguments 1 result list self each n if matchingAgainst cell n result theCode evaluateOn call ground cell n result argCount 3 matchingAgainst call argAt 0 argName call arguments 1 theCode call arguments 2 destructor Destructor from argName result list lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n if matchingAgainst cell n result lexicalCode call destructor unpack cell n result error Condition Error Invocation NoMatch message call message context call currentContext grep set takes one two or three arguments grep will first find any elements in the collection matching the first argument with if two or three arguments are given these will be used to transform the matching object and then add the transformed version instead of the original element to the result set the two argument version expects the second argument to be a message chain and the three argument version expects it to be something that can be turned into a lexical block show source macro argCount call arguments length cond argCount 1 matchingAgainst call argAt 0 result set self each n if matchingAgainst cell n result cell n result argCount 2 matchingAgainst call argAt 0 theCode call arguments 1 result set self each n if matchingAgainst cell n result theCode evaluateOn call ground cell n result argCount 3 matchingAgainst call argAt 0 argName call arguments 1 theCode call arguments 2 destructor Destructor from argName result set lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n if matchingAgainst cell n result lexicalCode call destructor unpack cell n result error Condition Error Invocation NoMatch message call message context call currentContext group returns a dict where all the keys are distinct elements in the enumerable and each value is a list of all the values that are equivalent show source method groupBy groupBy takes zero one or two arguments it will evaluate all the elements in the enumerable and return a dictionary where the keys will be the result of evaluating the arguments and the value will be a list of all the original values that match that key show source macro argCount call arguments length cond argCount 0 result dict self each n x cell n if result key cell x result cell x cell n result cell x list cell n result argCount 1 theCode call arguments 0 result dict self each n x theCode evaluateOn call ground cell n if result key cell x result cell x cell n result cell x list cell n result argCount 2 argName call arguments 0 theCode call arguments 1 result dict destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if result key cell x result cell x cell n result cell x list cell n result error Condition Error Invocation NoMatch message call message context call currentContext include toFind takes one argument and returns true if this element is in the collection comparisons is done with show source method toFind self each n if toFind cell n return true return false inject takes one two three or four arguments all versions need an initial sum code to execute a place to put the current sum in the code and a place to stick the current element of the enumerable if one argument it has to be a message chain this message chain will be applied on the current sum the element will be appended to the argument list of the last message send in the chain the initial sum is the first element and the code will be executed once less than the size of the enumerable due to this if two arguments given the first argument is the name of the variable to put the current element in and the message will still be sent to the sum and the initial sum works the same way as for one argument when three arguments are given the whole thing will be turned into a lexical closure where the first argument is the name of the sum variable the second argument is the name of the element variable and the last argument is the code when given four arguments the only difference is that the first argument will be evaluated as the initial sum show source macro argCount call arguments length if argCount 1 theCode call arguments 0 theCode theCode deepCopy elementName genSym theCode last message elementName sum nil self each i n if i 0 sum cell n call ground cell elementName cell n sum theCode evaluateOn call ground cell sum return cell sum if argCount 2 argName call arguments 0 theCode call arguments 1 elementName argName name sum nil self each i n if i 0 sum cell n call ground cell elementName cell n sum theCode evaluateOn call ground cell sum return cell sum if argCount 3 sumArgName call arguments 0 argName call arguments 1 theCode call arguments 2 destructor Destructor from argName lexicalCode LexicalBlock createFrom list sumArgName destructor argNames list theCode call ground sum nil self each i n if i 0 sum cell n sum lexicalCode call cell sum destructor unpack cell n return cell sum if argCount 4 sum call argAt 0 sumArgName call arguments 1 argName call arguments 2 theCode call arguments 3 destructor Destructor from argName lexicalCode LexicalBlock createFrom list sumArgName destructor argNames list theCode call ground self each n sum lexicalCode call cell sum destructor unpack cell n return cell sum error Condition Error Invocation NoMatch message call message context call currentContext join separator returns a string created by converting each element of the array to text separated by an optional separator show source method separator result self each index n result n asText if index count 1 result separator result map takes one or two arguments if one argument is given it will be evaluated as a message chain on each element in the enumerable and then the result will be collected in a new List if two arguments are given the first one should be an unevaluated argument name which will be bound inside the scope of executing the second piece of code it s important to notice that the one argument form will establish no context while the two argument form establishes a new lexical closure show source macro argCount call arguments length if argCount 1 theCode call arguments 0 result list self each n x theCode evaluateOn call ground cell n result cell x result if argCount 2 argName call arguments 0 theCode call arguments 1 result list destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n result cell x result error Condition Error Invocation NoMatch message call message context call currentContext map dict takes one or two arguments if one argument is given it will be evaluated as a message chain on each element in the enumerable and then the result will be collected in a new Dict if the message chain returns a pair that pair will be used as key and value if it s something else that value will be the key and the value for it will be nil if two arguments are given the first one should be an unevaluated argument name which will be bound inside the scope of executing the second piece of code it s important to notice that the one argument form will establish no context while the two argument form establishes a new lexical closure show source macro argCount call arguments length cond argCount 1 theCode call arguments 0 result dict self each n x theCode evaluateOn call ground cell n if cell x kind Pair result x key x value result cell x nil result argCount 2 argName call arguments 0 theCode call arguments 1 result dict destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x kind Pair result x key x value result cell x nil result error Condition Error Invocation NoMatch message call message context call currentContext map list nil show source macro argCount call arguments length if argCount 1 theCode call arguments 0 result list self each n x theCode evaluateOn call ground cell n result cell x result if argCount 2 argName call arguments 0 theCode call arguments 1 result list destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n result cell x result error Condition Error Invocation NoMatch message call message context call currentContext map set takes one or two arguments if one argument is given it will be evaluated as a message chain on each element in the enumerable and then the result will be collected in a new Set if two arguments are given the first one should be an unevaluated argument name which will be bound inside the scope of executing the second piece of code it s important to notice that the one argument form will establish no context while the two argument form establishes a new lexical closure show source macro argCount call arguments length cond argCount 1 theCode call arguments 0 result set self each n x theCode evaluateOn call ground cell n result cell x result argCount 2 argName call arguments 0 theCode call arguments 1 result set destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n result cell x result error Condition Error Invocation NoMatch message call message context call currentContext mapFn blocks takes zero or more arguments that evaluates to lexical blocks these blocks should all take one argument these blocks will be chained together and applied on each element in the receiver the final result will be collected into a list the evaluation happens left to right meaning the first method invoked will be the first argument show source method blocks result list self each n current cell n blocks each b current cell b call cell current result current result mapFn dict blocks takes zero or more arguments that evaluates to lexical blocks these blocks should all take one argument these blocks will be chained together and applied on each element in the receiver the final result will be collected into a dict the evaluation happens left to right meaning the first method invoked will be the first argument show source method blocks result dict self each n current cell n blocks each b current cell b call cell current if cell current mimics Pair result current key current value result cell current nil result mapFn set blocks takes zero or more arguments that evaluates to lexical blocks these blocks should all take one argument these blocks will be chained together and applied on each element in the receiver the final result will be collected into a set the evaluation happens left to right meaning the first method invoked will be the first argument show source method blocks result set self each n current cell n blocks each b current cell b call cell current result current result max takes zero one or two arguments if zero arguments returns the maximum elemnt ackording to the ordering if one argument expects it to be a message chain if that message chain that will be used as a transform to create the element to compare with finally if two arguments are given the first argument is an unevaluated name and the second is a code element these will together be turned into a lexical block and used as the transformer for comparison the result will always be an element from the collection or nil if the collection is empty show source macro argCount call arguments length cond argCount 0 theMax nil theMaxVal nil self each n x cell n if theMax nil theMax cell n theMaxVal cell x if theMaxVal cell x theMax cell n theMaxVal cell x theMax argCount 1 theCode call arguments 0 theMax nil theMaxVal nil self each n x theCode evaluateOn call ground cell n if theMax nil theMax cell n theMaxVal cell x if theMaxVal cell x theMax cell n theMaxVal cell x theMax argCount 2 argName call arguments 0 theCode call arguments 1 theMax nil theMaxVal nil destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if theMax nil theMax cell n theMaxVal cell x if theMaxVal cell x theMax cell n theMaxVal cell x theMax error Condition Error Invocation NoMatch message call message context call currentContext member toFind nil show source method toFind self each n if toFind cell n return true return false min takes zero one or two arguments if zero arguments returns the minimum elemnt ackording to the ordering if one argument expects it to be a message chain if that message chain that will be used as a transform to create the element to compare with finally if two arguments are given the first argument is an unevaluated name and the second is a code element these will together be turned into a lexical block and used as the transformer for comparison the result will always be an element from the collection or nil if the collection is empty show source macro argCount call arguments length cond argCount 0 theMin nil theMinVal nil self each n x cell n if theMin nil theMin cell n theMinVal cell x if theMinVal cell x theMin cell n theMinVal cell x theMin argCount 1 theCode call arguments 0 theMin nil theMinVal nil self each n x theCode evaluateOn call ground cell n if theMin nil theMin cell n theMinVal cell x if theMinVal cell x theMin cell n theMinVal cell x theMin argCount 2 argName call arguments 0 theCode call arguments 1 theMin nil theMinVal nil destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if theMin nil theMin cell n theMinVal cell x if theMinVal cell x theMin cell n theMinVal cell x theMin error Condition Error Invocation NoMatch message call message context call currentContext none takes zero one or two arguments if zero arguments returns false if any of the elements yielded by each is true otherwise true if one argument expects it to be a message chain if that message chain when applied to the current element returns a true value the method returns false finally if two arguments are given the first argument is an unevaluated name and the second is a code element these will together be turned into a lexical block and tested against the values in this element if it returns true for any element this method returns false otherwise true show source macro argCount call arguments length cond argCount 0 self each n x cell n if cell x return false true argCount 1 theCode call arguments 0 self each n x theCode evaluateOn call ground cell n if cell x return false true argCount 2 argName call arguments 0 theCode call arguments 1 destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x return false true error Condition Error Invocation NoMatch message call message context call currentContext one takes zero one or two arguments if zero arguments returns true if exactly one of the elements is true otherwise false if one argument expects it to be a message chain that will be used as a predicate if that predicate returns true for exactly one element returns true otherwise false finally if two arguments are given the first argument is an unevaluated name and the second is a code element these will together be turned into a lexical block and tested against the values in this element if it returns true for exactly one element returns true otherwise false show source macro argCount call arguments length cond argCount 0 result false self each n x cell n if cell x if result return false result true result argCount 1 theCode call arguments 0 result false self each n x theCode evaluateOn call ground cell n if cell x if result return false result true result argCount 2 argName call arguments 0 theCode call arguments 1 result false destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x if result return false result true result error Condition Error Invocation NoMatch message call message context call currentContext partition takes zero one or two arguments if zero arguments will return a list containing two list where the first list contains all true values and the second all the false values if one argument is given it will be used as a predicate message chain and the return lists will be based on the result of this predicate finally if three arguments are given they will be turned into a lexical block and used as a predicate to determine the result value show source macro argCount call arguments length cond argCount 0 resultTrue list resultFalse list self each n x cell n if cell x resultTrue resultFalse cell n list resultTrue resultFalse argCount 1 theCode call arguments 0 resultTrue list resultFalse list self each n x theCode evaluateOn call ground cell n if cell x resultTrue resultFalse cell n list resultTrue resultFalse argCount 2 argName call arguments 0 theCode call arguments 1 resultTrue list resultFalse list destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x resultTrue resultFalse cell n list resultTrue resultFalse error Condition Error Invocation NoMatch message call message context call currentContext partition dict takes zero one or two arguments if zero arguments will return a list containing two dicts where the first dict contains all true values and the second all the false values if one argument is given it will be used as a predicate message chain and the return dicts will be based on the result of this predicate finally if three arguments are given they will be turned into a lexical block and used as a predicate to determine the result value show source macro argCount call arguments length cond argCount 0 resultTrue dict resultFalse dict self each n x cell n place if cell x resultTrue resultFalse if cell n mimics Pair place n key n value place cell n nil list resultTrue resultFalse argCount 1 theCode call arguments 0 resultTrue dict resultFalse dict self each n x theCode evaluateOn call ground cell n place if cell x resultTrue resultFalse if cell n mimics Pair place n key n value place cell n nil list resultTrue resultFalse argCount 2 argName call arguments 0 theCode call arguments 1 resultTrue dict resultFalse dict destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n place if cell x resultTrue resultFalse if cell n mimics Pair place n key n value place cell n nil list resultTrue resultFalse error Condition Error Invocation NoMatch message call message context call currentContext partition set takes zero one or two arguments if zero arguments will return a list containing two sets where the first set contains all true values and the second all the false values if one argument is given it will be used as a predicate message chain and the return sets will be based on the result of this predicate finally if three arguments are given they will be turned into a lexical block and used as a predicate to determine the result value show source macro argCount call arguments length cond argCount 0 resultTrue set resultFalse set self each n x cell n if cell x resultTrue resultFalse cell n list resultTrue resultFalse argCount 1 theCode call arguments 0 resultTrue set resultFalse set self each n x theCode evaluateOn call ground cell n if cell x resultTrue resultFalse cell n list resultTrue resultFalse argCount 2 argName call arguments 0 theCode call arguments 1 resultTrue set resultFalse set destructor Destructor from argName lexicalCode LexicalBlock createFrom destructor argNames list theCode call ground self each n x lexicalCode call destructor unpack cell n if cell x resultTrue resultFalse cell n list resultTrue resultFalse error Condition Error Invocation NoMatch message call message context call currentContext reduce nil show source macro argCount call arguments length if argCount 1 theCode call arguments 0 theCode theCode deepCopy elementName genSym theCode last message elementName sum nil self each i n if i 0 sum cell n call ground cell elementName cell n sum theCode evaluateOn call ground cell sum return cell sum if argCount 2 argName call arguments 0 theCode call arguments 1 elementName argName name sum nil self each i n if i 0 sum cell n call ground cell elementName cell n sum theCode evaluateOn call ground cell sum return cell sum if argCount 3 sumArgName call arguments 0 argName call arguments 1 theCode call arguments 2 destructor Destructor from argName lexicalCode LexicalBlock createFrom list sumArgName destructor argNames list theCode call ground sum nil self each i n if i 0 sum cell n sum lexicalCode call cell sum destructor unpack cell n return cell sum if argCount 4 sum call argAt 0 sumArgName call arguments 1 argName call arguments 2 theCode call arguments 3 destructor Destructor from argName lexicalCode LexicalBlock createFrom list sumArgName destructor argNames list theCode call ground self each n sum lexicalCode call cell sum destructor unpack cell n return cell sum error Condition Error Invocation NoMatch message call message context call currentContext reject takes one or two arguments if one argument is given it will be applied as a message chain as a predicate those elements that doesn t the predicate will be returned if two arguments are given they will be turned into a lexical block and used as a predicate to choose the elements that doesn t match show source macro argCount call arguments length cond argCount 0 result list self each n x cell n unless cell x result cell n result

    Original URL path: https://ioke.org/dok/latest/kinds/Mixins/Enumerable.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    arguments createMappersFrom arguments nil show source method arguments arguments map x Mapper from x tap m if m 1 mimics Mapper Ignore m 1 last true from arg nil show source method arg newD mimic if arg name newD mappers createMappersFrom arg arguments newD argNames newD argumentNamesFromMappers newD nested true newD argNames arg newD mapValue value ms result nil show source method value ms result value value asTuple asList if

    Original URL path: https://ioke.org/dok/latest/kinds/Mixins/Enumerable/Destructor.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    collected consed dropped droppedWhile each filtered grepped indexed interleave interpose mapped rejected selected sliced zipped Specs Inactive cells details kind Mixins Sequenced Active cells details collected nil show source macro call resendToReceiver self seq consed nil show source macro call resendToReceiver self seq dropped nil show source macro call resendToReceiver self seq droppedWhile nil show source macro call resendToReceiver self seq each nil show source macro argCount call arguments length cond argCount 0 seq argCount 1 chain call arguments 0 s seq while s next chain evaluateOn call ground s next argCount 2 argumentName call arguments 0 code call arguments 1 s seq lexicalCode LexicalBlock createFrom list argumentName code call ground while s next lexicalCode call s next argCount 3 indexArgumentName call arguments 0 argumentName call arguments 1 code call arguments 2 s seq lexicalCode LexicalBlock createFrom list indexArgumentName argumentName code call ground index 0 while s next lexicalCode call index s next index error Condition Error Invocation NoMatch message call message context call currentContext filtered nil show source macro call resendToReceiver self seq grepped nil show source macro call resendToReceiver self seq indexed nil show source macro call resendToReceiver self seq interleave nil show source macro call resendToReceiver self

    Original URL path: https://ioke.org/dok/latest/kinds/Mixins/Sequenced.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    details kind Number â â Active cells details other compares this against the argument should be overridden in this case only used to check for equivalent number kinds other nil show source method other if self same 0 Reflector other mimics cell other 0 bind rescue Condition Error fn c false self other abs Returns the absolute value of this number show source method if self 0 negation self hash

    Original URL path: https://ioke.org/dok/latest/kinds/Number.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    it signals a condition exponent returns this number to the power of the argument which has to be an integer addend returns the sum of this number and the argument if the argument is a rational it will be converted into a form suitable for addition against a decimal and then added if the argument is neither a Rational nor a Decimal it tries to call asDecimal and if that fails it signals a condition subtrahend returns the difference between this number and the argument if the argument is a rational it will be converted into a form suitable for subtracting against a decimal and then subtracted if the argument is neither a Rational nor a Decimal it tries to call asDecimal and if that fails it signals a condition divisor returns the quotient of this number and the argument other compares this number against the argument returning 1 0 or 1 based on which one is larger if the argument is a rational it will be converted into a form suitable for comparing against a decimal and then compared if the argument is neither a Rational nor a Decimal it tries to call asDecimal and if that doesn t

    Original URL path: https://ioke.org/dok/latest/kinds/Number/Decimal.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    representing infinity Mimics Number Ratio Inactive cells kind Active cells inspect mimic notice Specs Inactive cells details kind Number Infinity Active cells details inspect Returns a text inspection of the object mimic nil show source method error Condition Error CantMimicOddball

    Original URL path: https://ioke.org/dok/latest/kinds/Number/Infinity.html (2016-02-13)
    Open archived version from archive



  •