Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assignment3 #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adonisping
Copy link

Zhenping Zhang
46870074

@@ -28,8 +28,25 @@ defmodule Ex01 do
"""

def counter(value \\ 0) do
receive do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 + 10

@@ -1,6 +1,23 @@

defmodule Ex02 do

def new_counter(value \\ 0) do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10*3

@@ -60,7 +60,12 @@ defmodule Ex03 do
"""

def pmap(collection, process_count, function) do
« your code here »
chunk_size = Enum.count(collection) / process_count |> Float.ceil |> round
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

30

fyi you could use flat_map instead of map |> concat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants