-
-
Save KOBA789/605939bf3458c7a2a1597532625948f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// この関数と同等のコードを Rust で書いてください | |
// ヒント: | |
// - 文字列の結合やテンプレーティングは format!() マクロが使えます | |
// - Map 相当のデータ構造は std::collections::HashMap が使えます | |
function greetMap(id: number, name: string): Map<number, string> { | |
const map = new Map(); | |
const message = `Hello, ${name}!`; | |
map.set(id, message); | |
return map; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment