update
This commit is contained in:
parent
1f1ad49427
commit
6f050a029e
2496 changed files with 37609 additions and 3031 deletions
9
Task/Input-loop/Aime/input-loop.aime
Normal file
9
Task/Input-loop/Aime/input-loop.aime
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
void
|
||||
read_stream(file f)
|
||||
{
|
||||
text s;
|
||||
|
||||
while (f_line(f, s) != -1) {
|
||||
# the read line available as -s-
|
||||
}
|
||||
}
|
||||
8
Task/Input-loop/Erlang/input-loop.erl
Normal file
8
Task/Input-loop/Erlang/input-loop.erl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
% Implemented by Arjun Sunel
|
||||
-module(read_files).
|
||||
-export([main/0]).
|
||||
|
||||
main() ->
|
||||
Read = fun (Filename) -> {ok, Data} = file:read_file(Filename), Data end,
|
||||
Lines = string:tokens(binary_to_list(Read("read_files.erl")), "\n"),
|
||||
lists:foreach(fun (Y) -> io:format("~s~n", [Y]) end, lists:zipwith(fun(X,_)->X end, Lines, lists:seq(1, length(Lines)))).
|
||||
Loading…
Add table
Add a link
Reference in a new issue