/badmorse

Morse, but badly

Primary LanguageGo

Bad Morse Translator

                                                              }
                                                            }
                                                          }
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

This was borne out of a nerdsniping session in which we had a pleasure to see an assignment whereby the prof wanted students to write a string -> morse code translator in python using loops and ifs. The prof provided an example, except it was wrong.

So naturally we set out to implement it the worst possible way we could.

This is what I came up with. The code is in main.go file.

Warning

Do NOT look into the withslice.go file, for it contains a fast and good implementation.