Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Comment: | Bug fix - nth_wrap didn't work for last items in a list
I only noticed this just recently, which means it has been wrong for I don't know if I'd got half way through writing this and forgot to |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | v1.1.0 |
Files: | files | file ages | folders |
SHA3-256: |
76eac348fca2657b9258d798906358a2 |
User & Date: | base@atomicules.co.uk 2014-11-29 17:34:34 |
2014-11-29
| ||
17:42 |
Merge branch 'master' into osrm
Noticed the nth_wrap problem whilst developing this osrm branch as | |
17:34 |
Bug fix - nth_wrap didn't work for last items in a list
I only noticed this just recently, which means it has been wrong for I don't know if I'd got half way through writing this and forgot to | |
2014-03-11
| ||
14:43 | Merge branch 'master' of github.com:atomicules/heads-I-lose check-in: 736cabe83d user: base@atomicules.co.uk tags: trunk | |
Changes to headsilose.erl.
︙ | ︙ | |||
108 109 110 111 112 113 114 | nth_wrap(N, List) -> Rem = N rem (length(List)), if Rem > 0 -> lists:nth(Rem, List); Rem =:= 0 -> | < > > | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | nth_wrap(N, List) -> Rem = N rem (length(List)), if Rem > 0 -> lists:nth(Rem, List); Rem =:= 0 -> %Get last of list hd(lists:reverse(List)) end. find_next_day(Date_today) -> %get in seconds Seconds_today = calendar:datetime_to_gregorian_seconds(Date_today), Date_tomorrow = calendar:gregorian_seconds_to_datetime(Seconds_today+86400), |
︙ | ︙ |