Jump to content

Interactive programming (repl): Difference between revisions

Line 1,400:
irb(main):005:0> exit
$</lang>
 
=={{header|Rust}}==
<lang rust>
fn main() {
println!("{:?}", f("Rosetta", "Code", ":"));
}
 
fn f<'a>(s1: &'a str, s2: &'a str, sep :&'a str) -> String{
[s1,sep,sep,s2].iter().map(|x| *x).collect()
}
</lang>
Output:
<pre>
Rosetta::Code
</pre>
 
=={{header|S-lang}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.