Foo:@structtype={bar:char;}main:()={s:std::string=("hello");op:=:(c:char)unsafe_narrow<char>(std::toupper(c));ranges:namespace==std::ranges;// uppercase the string in-placeranges::transform(s.begin(),s.end(),s.begin(),op);ordinals:std::vector<std::size_t>=();// convert each char to size_tranges::transform(s,std::back_inserter(ordinals),:(c:char)casstd::size_t);std::cout<<"(s)$:";forordinalsdo(ord){std::cout<<" (ord)$";}// double each ordinalranges::transform(ordinals,ordinals,ordinals.begin(),std::plus());std::cout<<'\n';forordinalsdo(ord){std::cout<<"(ord)$ ";}std::cout<<'\n';f:conststd::vector=(:Foo=('h'),:Foo=('e'),:Foo=('l'),:Foo=('l'),:Foo=('o'));result:std::string=();// project, then uppercaseranges::transform(f,std::back_inserter(result),op,Foo::bar&);std::cout<<result<<'\n';}