Skip to content

Instantly share code, notes, and snippets.

@salzig
Created November 19, 2014 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salzig/93a46f353566fd3dae6d to your computer and use it in GitHub Desktop.
Save salzig/93a46f353566fd3dae6d to your computer and use it in GitHub Desktop.
Was fehlt.....
%% aufruf um exemplarisch über "zahlen.dat" zu laufen
runSelectionSortExample() ->
StartTime = time(),
selectionSortOverFileLines("zahlen.dat").
%% Öffne Datei, und iteriere über die Tuple
selectionSortOverFileLines(Filename)
Tuples = file:consult(FileName),
selectionSortOverTuples(Tuples).
%% Tuple Liste enthält nur noch ein Element
selectionSortOverTuples([Tuple]) ->
SelectionS(Tuple).
%% Nimm Kopf aus der Liste, und rufe rekursiv auf.
selectionSortOverTuples([Tuple|Rest]) ->
SelectionS(Tuple),
selectionSortOverTuples(Rest).
SelectionS(Array) -> …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment