That’s how the Swift interpreter prints out closures. Try let testClosure =
{} in the REPL and you’ll get a similar result, except with different
arguments and return value due to {} being () -> ().
On Wed, Jun 15, 2016 at 8:13 PM Doug Hill via swift-users <
swift-users@swift.org> wrote:
> Thank
Thank you Saagar for looking over this code for me. I guess I got really caught
up in the weird diagnostic message and assumed things weren’t working.
Now I see that ‘afunc’ works as I expected:
60> g.afunc(numberRecords:1,userRecord:(13,9))
13 9
$R3: (Int, (Int, Int)) = {
0 = 13
1 = {
0
`Gen` defines `afunc`, but you’re trying to access `aFunc`.
On Wed, Jun 15, 2016 at 6:22 PM Doug Hill via swift-users <
swift-users@swift.org> wrote:
> I’m just starting to learn Swift and attempting to do some
> functional-style programming. Specifically I’m learning how to create
> generic algo
I’m just starting to learn Swift and attempting to do some functional-style
programming. Specifically I’m learning how to create generic algorithms that
can be reused for many different types.
What I’m attempting to do is create a new object, passing functions to the
initializer. The class would