Timeline for How to convert vehicle schedule time window calculation algorithm to FP
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 10, 2021 at 5:57 | answer | added | Blaž Mrak | timeline score: 1 | |
| Dec 10, 2021 at 5:46 | history | edited | Blaž Mrak | CC BY-SA 4.0 |
deleted 722 characters in body
|
| Dec 10, 2021 at 5:28 | history | edited | Blaž Mrak | CC BY-SA 4.0 |
added 722 characters in body
|
| Dec 9, 2021 at 21:18 | answer | added | user1172763 | timeline score: -1 | |
| Dec 1, 2021 at 21:41 | comment | added | Blaž Mrak | Ugly: because of for loops and querying that happens in them... It just doesn't feel right for what it does. Can't put a finger on it, but just a feeling. Why do it in FP? Because. I'm not planning to change it unless FP is somehow much cleaner, but I'm just interested how this could be done in FP. The problem I come to is, that windows are related to each other, and are not immutable (the change of the current window is going to collide with the change of the next window). I don't know much of FP, only the principles and this problem seems to be hard to solve with it (at least for me). | |
| Dec 1, 2021 at 21:32 | comment | added | Vincent Savard | There's a couple small jumps of logic from your question that I don't completely understand. You go from "I have an optimal algorithm that works" (Good!) to "It's ugly" (Why?) to "How would you do it in FP" (Why?). Is there any issue with your algorithm beside the fact that it is supposedly ugly and not FP? | |
| Dec 1, 2021 at 20:56 | history | edited | Blaž Mrak | CC BY-SA 4.0 |
edited tags; edited title
|
| Dec 1, 2021 at 20:49 | history | asked | Blaž Mrak | CC BY-SA 4.0 |