Group Abstract Group Abstract

Message Boards Message Boards

1
|
7.6K Views
|
3 Replies
|
1 Total Like
View groups...
Share
Share this post:

[WSG20] Wolfram Language Basics from EIWL (Days 4 and 5)

3 Replies

You have to use SetAttributes to make your function Listable as shown in https://reference.wolfram.com/language/ref/SetAttributes.html

Hello.

First at all, thank you for organise this Wolfram Study Group; I really enjoying it and Rory Fulger explain everything clear.

Nevertheless, Im strugling to complete the graded exercises about Pure Anonymous Functions, Do you have any suggestion or clue to solve this?

"Write a function myListableFun[x_]:=x^2 that will work the same way on a list as Map[#^2&,<list>]."

I know is something about Set Attributes . I have this :

myListableFun[x, x^2] /@ {1, 2, 3, 4}

But doesnt works with this input:

MyListableFun[{list}]

Thanks in advance!

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