Skip to content

Instantly share code, notes, and snippets.

@colomon
Created November 16, 2010 18:01
Show Gist options
  • Save colomon/702174 to your computer and use it in GitHub Desktop.
Save colomon/702174 to your computer and use it in GitHub Desktop.
sub whatever_curry($/, $past, $upto_arity) {
- if $past.isa(PAST::Op) && !%not_curried{$past.name} && $past<pasttype> ne '
- if ($upto_arity >= 1 && ($past[0].returns eq 'Whatever' || $past[0].ret
- || ($upto_arity == 2 && ($past[1].returns eq 'Whatever' || $past[1].ret
+ if $past.isa(PAST::Op) && %not_curried{$past.name} != 2 && $past<pasttype>
+ if ($upto_arity >= 1 && (($past[0].returns eq 'Whatever' && !%not_curri
+ || $past[0].returns eq 'WhateverCode'))
+ || ($upto_arity == 2 && (($past[1].returns eq 'Whatever' && !%not_curri
+ || $past[1].returns eq 'WhateverCode')) {
my $counter := 0;
my $sig := Perl6::Compiler::Signature.new();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment