Group Abstract Group Abstract

Message Boards Message Boards

3
|
11.7K Views
|
6 Replies
|
7 Total Likes
View groups...
Share
Share this post:

Creating f[a][b][c][d]

Posted 10 years ago
POSTED BY: David Reiss
6 Replies

Thanks everyone!

POSTED BY: David Reiss

A version suggested by Toni Schindler:

Fold[#[#2] &, f, {a, b, c, d}]

f[a][b][c][d]

POSTED BY: Vitaliy Kaurov

Dang! Jose beat me to it. :)

What about something like this?

In[1]:= Fold[Compose, f, {a, b, c, d}]

Out[1]= f[a][b][c][d]

Jose.

Nice one, @Jose M. Martin-Garcia! Docs say Compose has been superseded by Composition but simple replacement of former by later in your code did not work. @Jose M. Martin-Garcia, @Christopher Carlson, do you know what would do the trick?

POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard