Instead of a slice, i have to retrieve words from a file and i have to only output words whereby the letters are of running letters like feed, and bcd
So i came up with this func, whereby r []rune is the int representative of the alphabets and line is the words from the file. This function supposedly minus the value in position k and the value in position m, and if the output is either 0 or 1, it will return bool. But i can't get this if l[k]-l[m]=0 | l[k]-l[m]=1{ to work
func differenceofint(r []rune, line string) bool{
for i, j := range r{
k := int(i) //position
l := int(j) //the int representative
m:=int (i+1)
fmt.Println(k, l,m)
if l[k]-l[m]=0 | l[k]-l[m]=1{
return true
}
}
return false
}