Better HN
topnewbestaskshowjobs
Log inSign up

kaikalii

53 karma · joined Dec 2, 2021 (4y ago) · 3 submissions

Submissions

comment 3y ago · link · parent

That's some dedication! You can indeed get the maximum item in an array with `/↥`. Here is my fizzbuzz solution: (https://uiua.org/pad?src=fizzbuzz%20%E2%86%90%20%28%0A%20%20...)

comment 3y ago · link · parent

Oh hey, I made this. Cool to see it at the top of HN!

comment 3y ago · link · parent

    trait Namer {
        fn first(&self) -> String;
        fn last(&self) -> String;
        // You can put this here if you want `namer.name()`
        fn name(&self) -> String {
            format!("{} {}", self.first(), self.last())
        }
    }

    fn name(n: &impl Namer) -> String {
        format!("{} {}", n.first(), n.last())
    }