Top Level Namespace

Includes:
Kernel

Defined Under Namespace

Modules: Enumerable, Kernel, Lab42 Classes: Array, Dir, File, Hash, Module, Object, OpenObject, Proc

Constant Summary collapse

Identity =
Lab42::Behavior::ProcBehavior.new{ |x| x }

Instance Method Summary collapse

Methods included from Kernel

#require_relative_dir

Instance Method Details

#_realize_args_(para, args) ⇒ Object

module Lab42



6
7
8
# File 'lib/lab42/core/console_tools/func.rb', line 6

def _realize_args_ para, args
  args.map{ |arg| Proc === arg ? arg.(para) :arg }
end

#B(msg, *a, &b) ⇒ Object



4
5
6
# File 'lib/lab42/core/b.rb', line 4

def B msg, *a, &b
  Lab42::Behavior::SendBehavior.new msg, *a, &b
end

#f(*args) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/lab42/core/console_tools/func.rb', line 11

def f *args
  # At this level we need to see if there is a Lab42::Receiver
  if Symbol === args.first
    -> r do
      r.send *_realize_args_( r, args )
    end
  else
    -> *r do
      args.first.send *_realize_args_( r.first, args.drop(1) )
    end
  end
end