Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
defmodule Table do
|
||||
defp put_rows(n) do
|
||||
Enum.map_join(1..n, fn i ->
|
||||
"<tr align=right><th>#{i}</th>" <>
|
||||
Enum.map_join(1..3, fn _ ->
|
||||
"<td>#{:rand.uniform(2000)}</td>"
|
||||
end) <> "</tr>\n"
|
||||
end)
|
||||
end
|
||||
|
||||
def create_table(n\\3) do
|
||||
"<table border=1>\n" <>
|
||||
"<th></th><th>X</th><th>Y</th><th>Z</th>\n" <>
|
||||
put_rows(n) <>
|
||||
"</table>"
|
||||
end
|
||||
end
|
||||
|
||||
IO.puts Table.create_table
|
||||
Loading…
Add table
Add a link
Reference in a new issue