{
   "description" : "",
   "ancestor_list" : [],
   "name" : "if-then-else alternative to Platform.case",
   "author" : "LightRate",
   "is_private" : null,
   "id" : "1-51L",
   "code" : "// Normally, controlling platform specific commands is implemented with Platform.case:\r\n\r\n(\r\nPlatform.case\r\n{\\osx}\r\n{\r\n\topenOS(\"https://apple.com\")\r\n}\r\n{\\linux}\r\n{\r\n\topenOS(\"https://linux.com\")\r\n}\r\n{\\unix}\r\n{\r\n\topenOS(\"http://unix.org\")\r\n}\r\n{\\windows}\r\n{\r\n\topenOS(\"https://microsoft.com\")\r\n}\r\n);\r\n\r\n// But what if you need an 'if-then-else' style of Platform control?\r\n\r\n// In these situations, the Platform.case method isn't the most elegant, or efficient solution.\r\n\r\n// Here is an alternative route:\r\n\r\nif(\r\n\tthisProcess.platform.asSymbol == 'an OSXPlatform',\r\n\t{\r\n\t\t// true function\r\n\t},\r\n\t{\r\n\t\t// false function\r\n\t}\r\n)",
   "labels" : [
      "platform"
   ]
}
