mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
Abschnitt über Arithmetik in Prolog hinzugefügt; misc
This commit is contained in:
parent
82dd24d55b
commit
80e8df59d6
20 changed files with 194 additions and 27 deletions
|
@ -8,5 +8,7 @@ hIndex l = helper (reverse (sort l)) 0
|
|||
| otherwise = acc
|
||||
|
||||
-- Alternativ
|
||||
hindex1 = length . takeWhile id . zipWith (<=) [1..] . reverse . sort
|
||||
hindex2 = length . takeWhile (\(i, n) -> n >= i) . zip [1..] . reverse . sort
|
||||
hindex1 = length . takeWhile id .
|
||||
zipWith (<=) [1..] . reverse . sort
|
||||
hindex2 = length . takeWhile (\(i, n) -> n >= i) .
|
||||
zip [1..] . reverse . sort
|
Loading…
Add table
Add a link
Reference in a new issue