Moderators: They make you lose count(Longest thread still alive!)

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
31 I love how I have multiple function that consist of only 2 lines. I wonder if it would be beneficial to make them even smaller.
 

Someone Else 37

Forum Addict
Feb 10, 2013
1,876
1,440
168
32 I dunno. Probably not, unless you're code golfing.

And I cannot help but be reminded of Haskell's two-line quicksort:
qsort [] = []
qsort (x:xs) = (qsort [n | n <- xs, n < x]) ++ [x] ++ (qsort [n | n <- xs, n >= x])
I think I'm remembering that correctly, at least.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
33 the code is
PHP:
public function login(){
        parent::redirectLoggedIn();
        parent::loadAll("users/login");
    }
    public function register(){
        parent::redirectLoggedIn();
        parent::loadAll("users/register");
    }
I could technically make a function that combines both loadAll and redirectLoggedIn this makes them both only 1 line big :p